Results 1 to 3 of 3

Thread: SegmentedButton on DataItem : Stopping propagation of toggle event

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Answered: SegmentedButton on DataItem : Stopping propagation of toggle event

    Hi,

    I have a segmentedButton control on a dataItem row. I'm listening for itemtap on the DataView and loading the details screen in response. However, because the segmentedButton is on the dataItem, a tap/toggle on the segmentedButton triggers a itemtap on the DataView as well. This makes the segmentedButton control unusable (since any interaction with it loads the details screen).

    How do I cancel event propagation in the toggle event of the segmentedButton control?

  2. One option is to investigate the target of the tap. An example is shown in the fiddle below. You'll only access the details view if the tap occurs on an element who's className property does not contain "x-button".

    Regards,
    Brian

    https://fiddle.sencha.com/#fiddle/flc

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •