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

fix: Trigger custom click handler in collapsible nodes #137

Merged
merged 2 commits into from
Oct 16, 2018

Conversation

LonelyPrincess
Copy link
Collaborator

@LonelyPrincess LonelyPrincess commented Oct 16, 2018

There was a mistake in the _tick method which caused the user's
onClickNode custom handler to never be triggered when the collapsible
feature was enabled.

The problem was that it called setState without using a callback
parameter if the received cb was not empty. The contents of that
ternary operator should be the opposite for things to work.

This fix closes #136.

LonelyPrincess and others added 2 commits October 16, 2018 10:48
There was a mistake in the `_tick` method which caused the user's
`onNodeClick` custom handler to never be triggered when the collapsible
feature was enabled.

The problem was that it called `setState` without using a callback
parameter if the received `cb` was not empty. The contents of that
ternary operator should be the opposite for things to work.

This fix closes #136.
@danielcaldas
Copy link
Owner

My bad! 😓 🔥 Just added a e2e test to ensure the functionality

@danielcaldas danielcaldas merged commit 9bbf5b7 into master Oct 16, 2018
@danielcaldas danielcaldas deleted the fix/collapsible-custom-click branch October 16, 2018 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom onNodeClick handler not triggering on collapsible nodes
2 participants