Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
uriklar opened this issue Apr 7, 2016 · 2 comments

Comments

@uriklar
Copy link

uriklar commented Apr 7, 2016

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

@georgeOsdDev
Copy link
Owner

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/

@uriklar
Copy link
Author

uriklar commented Apr 10, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants