Programmatically Expand/Collapse (Expandable) Rows in Table

Hi @shawnhoffman,

I don't think you can accurately use the expandedRowText's hidden property alone to check if a row is expanded

If you look at the state for the expandable row's child components, the component doesn't exist in state until you've expanded the row

Haven't expanded any rows yet:

State after expanding the first two rows (stays the same after closing the first row):

I thought Miguel's idea of checking if the row has ever been expanded, it'll be in the state, and can therefore be evaluated was working for me, but I seem to be running into some caching issues. We have a feature request for a collapse row event handler that would be helpful for maintaining a list of the currently expanded rows

3 Likes