reactable icon indicating copy to clipboard operation
reactable copied to clipboard

Expanded row status

Open lemuelemos opened this issue 3 years ago • 2 comments

Can i take the status when the the table is expanded? Actualy i ses only selection, or page status.

lemuelemos avatar Jun 23 '21 14:06 lemuelemos

Hi, can you be more specific? Do you want to get the expanded status of a row from a custom render function, styling function, or from a Shiny app?

If you need the expanded status for custom rendering or styling, it was recently added to the JavaScript render and style functions in the development version:

JavaScript render functions and style functions receive several new properties:

  • rowInfo.expanded and cellInfo.expanded indicating whether the row is expanded

https://glin.github.io/reactable/articles/custom-rendering.html#rowinfo-properties

There's no example of this in the docs yet, but I could create an example if you have one in mind.

glin avatar Jul 11 '21 23:07 glin

Would adding an equivalent for cellInfo.expanded to getReactableState help with https://github.com/glin/reactable/issues/181#issuecomment-940082760? e.g., by attaching an observer to monitor row expansion, and return a uiOutput for an expanded row.

gofford avatar Oct 11 '21 14:10 gofford