SwipeableViews onChangeIndex event handler never called when used in the Tabs component #22351
Closed
2 tasks done
Labels
component: tabs
This is the name of the generic UI component, not the React module!
external dependency
Blocked by external dependency, we can’t do anything about it
Using
Tabs
withSwipeableViews
, the first time a Tab is changed there is no sliding animation. This is the case in the Material UI documentation: https://material-ui.com/components/tabs/, and also in my own code.I don't know if this is a problem with SwipeableViews or Material UI, but since the problem is present in the Material UI docs I thought it best to start here.
Current Behavior 😯
I've attached a giff that shows that the first time a tab is changed the swipeable animation doesn't fire (this is also the case in Material UI documentation as linked to above).
In my code:
I can see that the
onChangeIndex
handler doesn't ever get called.Expected Behavior 🤔
The swipeable animation should fire on every change. And the
onChangeIndex
handler should be called.The text was updated successfully, but these errors were encountered: