Hí
I want to store selected item when i select a multi item on treview. İ looking for synfussion doc, it is exist. But doesnt work for me.
Could you help me.
Thanks.
private selectedNodeList=[]
axios
.get(
`......`
)
.then((res) => {
const tradesData = res.data;
const allowMultiSelection = true;
const allowDragAndDrop = true;
const fieldsForTrades = {
dataSource: tradesData,
id: 'ID',
parentID: 'ASSIGNMENT_ID',
text: 'NAME',
child: 'Assignment',
hasChildren: 'true',
selected: 'isSelected',
};
this.setState({
fields: fieldsForTrades,
allowMultiSelection: allowMultiSelection,
allowDragAndDrop: allowDragAndDrop,
});
});
render()
{
<div>
<TreeViewComponent
className='treeTrades123'
id='treeTrades'
nodeDragStop={this.itemMoved.bind(this)}
nodeDropped={this.itemArrived.bind(this)}
nodeDragging={this.nodeDrag.bind(this)}
fields={this.state.fields}
allowMultiSelection={true}
allowDragAndDrop={true}
ref={(treeview) => {
this.treeObj = treeview as TreeViewComponent;
}}
nodeClicked={this.nodeclicked.bind(this)}
showCheckBox={this.isChecked}
nodeChecked={this.nodeChecked}
dragArea={document.getElementById('SplitterInner') as HTMLElement}
nodeSelected={this.nodeSelected.bind(this)}
selectedNodes={this.selectedNodeList}
/>