Skip to content
This repository was archived by the owner on Jan 16, 2023. It is now read-only.

Conversation

TimYi
Copy link

@TimYi TimYi commented Dec 18, 2015

This property will be passed on to every node element.
For example, you add an edit button on every node, when click this button, you want to invoke something like ()=>onEdit(props.node).
In that case, you would like to write like . Then, in every node, you can use props.onEdit.

Hi Alex, I readed the source code and used Treebread in my work. Really good work, abstract the function of a treeview apart from it's display very well.
I'm a backend programmer, and not familiar with front end tools. I learned webpack, npm and react a few days ago. So I know I should write some test, but it's not that easy for me to let it run.
I think it will work for I test this grammar in my project.

This property will be passed on to every node element.
For example, you add an edit button on every node, when click this button, you want to invoke something like ()=>onEdit(props.node).
In that case, you would like to write like <Treebread shareProps={{onEdit:this.edit}} />. Then, in every node, you can use props.onEdit.
@alexcurtis
Copy link
Collaborator

@TimYi Thanks. I'll review and write a test for this. I might change the prop name, but the concept is good.

@TimYi TimYi closed this Nov 3, 2016
@reno-xjb
Copy link

Hey guys, we are using react-treebeard, can this feature get implemented ? It would be really helpful

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants