react-treebeard
react-treebeard copied to clipboard
Modifying the decorators, changes are reflecting all over the application.
I am using react-treebeard React Tree View Component in my application and multiple places and it is working great.
But when I try to change the decorators for one place, the changes are taking effect all over the application.
How Can I can change the decorator for only one place in a way where it will not impact the other instances.
I don't know if you made it work, but here's how I did it:
import {Treebeard, decorators} from 'react-treebeard';
const modifiedDecorators = Object.assign({},decorators, { Header: (props) => {
...
}});
then pass modifiedDecorators
to your Treebeard
as decorators.
Hope that helps.