This repository was archived by the owner on Dec 7, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Edit tree node contents #50
Copy link
Copy link
Open
Description
I am using the display prop to render custom text and display an "edit" button in react. i am passing the object passed to the display function to the onClick handler of the button to be used for editing. is the object passed to the display function the actual object from within the original tree model? i.e. if I update the passed object am i updating the original data? If not, how could I programmatically delete and add a new node with the updated content? or update and render the original data?
mainTreeProps = {
...this.treeProps, display: d => <div><Button onClick={() => {
d.items ? this.props.EditGroup(d) : this.props.EditItem(d);
}}>Edit</Button>{d.name}</div>
};(i.e. is "d" a copy or a reference to the object in the original model / object)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels