SegmentedBar: Always fire the selectedIndexChange event if keep taping


#1

Hey guys, is there a way to configure the SegmentedBar to be able to trigger the selectedIndexChange event even if the index is the same? What I mean is fire the event if I click taping on the same item?

Thanks!


#2

I don’t think that is possible, but by writing some native code I think you can listen for click event on each tab item.


#3

You will have to create your own version of the segmented bar for that.
Maybe use some labels inside a horizontal stack layout, and style it to look like a segmented bar.

And then you can have tap events on each of the labels, and that will trigger the tap events as many times as you like.

But, can you explain the use case for this? I’m intrigued.


#4

Hello @multishiv19, thanks for your answer. I am using the SegmentedBar to filter on a list by custom dates, for example: 6 months, 1 year, 3 years and a calendar icon to select a custom range. Problem is that if I need to select another Range after I selected one its not triggering the event, so I have to select any of the other filters.

Thanks!