constantin-p / cp-react-tree-table

A fast, efficient tree table component for ReactJS.
https://constantin.software/cp-react-tree-table
MIT License
94 stars 27 forks source link

Set model.$state.isExpanded only when model.metadata.hasChildren is true #45

Closed antoninkriz closed 2 years ago

antoninkriz commented 2 years ago

Row without any children can not be expanded, therefore setting true to isExpanded to a row without any produces an illogical state. This may lead (or leads) to bugs when the state of a row is used i.e. for styling. This fix should set model.$state.isExpanded only when such row has children.

constantin-p commented 2 years ago

@antoninkriz Thanks for catching this! The changes from this PR are available in v1.1.1.