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

hasVisibleChildren on RowMetadata for v1.0 #15

Closed ChristineDu closed 4 years ago

ChristineDu commented 5 years ago

Hi,

I noticed that in v1.0 hasVisibleChildren has been removed from RowMetadata properties. Is there other substitutes for this property? Basically what I'm trying to achieve is to show different toggle icon when the node is expanded.

Thanks!

constantin-p commented 5 years ago

Hi @ChristineDu,

You are right, v1.0 has no equivalent of hasVisibleChildren at the moment. Towards the end of next week I'm going to implement this functionality.

thinkle-iacs commented 5 years ago

Any update on the visible children functionality?

constantin-p commented 5 years ago

@thinkle-iacs I need to spend a few hours to implement it, but unfortunately my schedule is pretty full. I'm going to see if I can take a look at it during the next few weekends but I'm not promising anything.

gax97 commented 4 years ago

Any update on this?

constantin-p commented 4 years ago

The latest version (npm: v1.0.0-beta.9) introduces isExpanded as a property on the RowState object, which means that the expanded/collapsed state of a node can now be accessed inside the cell renderer through row.$state.isExpanded.

Demo | JSFiddle