glin / reactable

Interactive data tables for R
https://glin.github.io/reactable
Other
613 stars 79 forks source link

Expanded row status #173

Open lemuelemos opened 3 years ago

lemuelemos commented 3 years ago

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

glin commented 2 years ago

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.

gofford commented 2 years ago

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.