react-draggable-tab icon indicating copy to clipboard operation
react-draggable-tab copied to clipboard

handleTabClick being called after drag stop only when a tab has been dropped before another tab

Open uriklar opened this issue 8 years ago • 2 comments

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

uriklar avatar Apr 07 '16 10:04 uriklar

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/

georgeOsdDev avatar Apr 08 '16 00:04 georgeOsdDev

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.

uriklar avatar Apr 10 '16 08:04 uriklar