react-checkbox-tree
react-checkbox-tree copied to clipboard
Parent ids in checked state
what is the approach or algorithm if we need to store all the selected leaves ids and their parents ids recursively?
You can use checkModel="all" such that if a parent node has all children fully checked it will be included in the checked array.
You can use
checkModel="all"such that if a parent node has all children fully checked it will be included in thecheckedarray.
Yes but what if we wanna add the parent to the checked array if at least one of its children is checked?
Currently, that is not possible. Partially-checked nodes (that is, nodes with at least one child checked but not all children checked) are never included in the checked array.
A future version could support such behavior, but it would require a bit of a rework of the internals.
Is there any news on this yet?