react-redux-grid
react-redux-grid copied to clipboard
tree view: Is there a way set if a parent node should be initially expanded?
I really like the tree view in the grid. Though I'd like a way to choose if the parent nodes are expanded when the grid is loaded. Is there a way to do this already? What about a way to expand/collapse the tree structure programmatically?
I feel like I've seen example of this kind of behavior -- perhaps @Vanderslice may have some insight here.
Found out how: just add _hideChildren: true as a field on the tree-data entry whose children should be collapsed.
Example:
const treeEntry = {
name: "some name",
children: [
{name: "other name},
],
_hideChildren: true
};