Open neewbee opened 6 years ago
You can control the value by onChange
callback, any nodes you don't want to change, just do not any change in onChange
.
I have tried onChange:(value, label, extra) => { setFieldsValue({"treeSelect":extra.preValue }) }
doesn't work.
Should I return prevValue in onChange
?
Just ignore the change.
onChange(value) {
if (readOnly(value)) {
return;
}
}
Do you mean adding onChange:() => { return null }
at line
https://github.com/react-component/tree-select/blob/36c14ea7766eeffc75dd34315af44b9a7253e7a4/examples/form.js#L59
?
disabled the item and treeSelect won't work disabled the three nodes , you still can delete the selected nodes by click the x icon