react-draggable-tab
react-draggable-tab copied to clipboard
handleTabClick being called after drag stop only when a tab has been dropped before another tab
Let's say I have Tab1/Tab2/Tab3 If I drag Tab1 in front of Tab2, handleTabClick isn't called. If I drag Tab3 before Tab2 (so the order is Tab1/Tab3/Tab2) the handleTabClick function is triggered. Is this expected behavior? Thanks! Uri
Hi Uri,
I think keepSelectedTab
prop resolve your confusion.
When keepSelectedTab=true
,
case moved tab is selectedTab
:
=> onTabSelected will be triggered.
case moved tab is not selectedTab
:
=> onTabSelected will not be triggered.
Please try demo with opening console. http://georgeosddev.github.io/react-draggable-tab/example/
Is there a way to prevent onTabSelected from being triggered in all drag drop cases? I tried changing the values of keepSelectedTab but onTabSelect still gets triggered on the case I described.