-
Notifications
You must be signed in to change notification settings - Fork 294
On click toggle #51
On click toggle #51
Conversation
Use Case: clicking a toggle icon to view child nodes does not equal selecting that node. Add onClickIcon to handle this case.
How can we use that? I tried to pass an onClickIcon prop to TreeBeard component but it didn't work. |
I didn't update the default decorators to use this. You have to use it in a custom decorator. Example:
I'm using this in a dropdown, and I want it to auto-close when i select a node, but not when I click the caret to explode the tree node. |
I'm using like this:
|
If you have no custom decorators, nothing is using it. I didn't want to
break existing functionality.
…On Wed, Feb 1, 2017 at 12:13 PM Witalo Benicio ***@***.***> wrote:
I'm using like this:
<Treebeard
onClickIcon={this.onClickIcon.bind(this)}
data={this.state.dataSecondarySubject}
style={treeStyle}
onToggle={this.onToggleSecondary.bind(this)}
/>
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#51 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AFUWt1Rc7jkDuF56d2Q3MRWzVWSJ263fks5rYL0sgaJpZM4LLCZn>
.
|
can someone merge this PR? |
@goodmorninggoaway - why not change the default decorators? This is just adding functionality isn't it? How will it break the existing one? I would also expect a change in the README file saying you can pass this new prop.. |
can someone merge this PR? |
@mpeula-pe: @goodmorninggoaway First needs to resolve the conflicts before this one can be merged |
When will this be merged in and available? |
This looks good to add? I also have a use case in a real world app for this functionality. Cheers! |
Would love to see this merged in. |
When will this be merged in and available? |
Use Case: clicking a toggle icon to view child nodes does not equal selecting that node.
Add onClickIcon to handle this case.