material-table-core / core

Datatable for React based on material-ui's table with additional features. Support us at https://opencollective.com/material-table-core
https://material-table-core.github.io
MIT License
296 stars 146 forks source link

Opened/Closed hooks for detail panel #809

Closed jbek7 closed 1 year ago

jbek7 commented 1 year ago

Is your feature request related to a problem? Please describe. I want to know which row's detail panel is opened/closed so I can run operations inside detail panel knowing which row's detail panel that I'm working with. Currently detailPanel property just passes rowData but it sends not only one but other row's rowData too which is not reliable. See the gif - it's from the doc's detail panel's live demo. I just added the log inside the detailPanel property to show what rowData brings.

material-table-hook

Describe the solution you'd like It would be nice to have opened/closed hooks with rowData for detailPanel so we can keep track what's open/closed.

Domino987 commented 1 year ago

The gif is not visible.

Domino987 commented 1 year ago

Will be included in the next version: onDetailPanelChange?: (row: RowData, state: 'open' | 'closed') => void;

jbek7 commented 1 year ago

Great that should solve the problem that I'm having.

Wdifulvio523 commented 9 months ago

I am on the most up-to-date version of this and I am not getting onDetailPanelChange to trigger, has it not been released yet?