when i set state in nodeSelected event, it makes selected node deselect, as if it intervene the event.
My concstructor:
constructor(props) {
super(props);
this.onNodeSelected = this.onNodeSelected.bind(this);
}
My render looks like:
<TreeViewComponent
id='categoryTreeView'
loadOnDemand={false}
fullRowSelect={false}
fields={{
dataSource,
id: 'mediaFolderId',
text: 'Name',
parentID: 'parentFolderId',
hasChildren: 'hasChild'
}}
className='syncfusion-tree-view'
nodeSelected={ this.onNodeSelected }
ref={element => this.treeViewElement = element}
/>
updating state:
onNodeSelected = () => {
this.setState({ viewAllButton: true});
}
could you please let me know what i'm doing wrong. I even tried redux action to update state, but i get the same result