Ability to toggle detail panels from location other than front of row.
Just like there's now a way to display action icons based on column index, it would be great to be able to toggle the detail panel row from other locations than the beginning of the row. I'd like to be able to click on or next to a specific column that has info or buttons related to it and then be able to see that content in the detail panel by clicking there. Basically allowing the placement of icons that will trigger the detail panel to be done based on column index.
Hi @roseak,
That would be really great feature. Such as rowclick of any other event should fire the detailPanel toggle. Now i am working data grouping feature. Then i will consider this feature.
Hi @mbrn , I like the idea of row clicking to fire the detailPanel toggle.
Looking forward to it!
'data grouping feature'? Do you mean tree data structure?
Anyway, this is a nice, handy library!
Thank you!
I will do this for next release. Data grouping is now done. You can use it. Look at examples. Tree data feature is another feature that i will do in 2 3 weeks
This is done now. Usage is simple. I set toggleDetail function as third parameter onRowClick. You can use it like this:
onRowClick={(event, rowData, togglePanel) => togglePanel()}
// if you have multiple panel you can send panel index as parameter
onRowClick={(event, rowData, togglePanel) => togglePanel(1)}
v1.16.0 published
Hi mbrn, I'm loving the library! Is there any way that I could trigger the detail panel based on a specific cell click? For example, triggering a different detail panel depending on which cell in the row I click?
Thanks in advance!
Do we have any possibility to togglePanel from a single cell (Column)?
It would just be nice of the onRowClick was also provided the column definition as an argument. That way, it would be possible to set some state to determine what should be displayed in the detail panel.
https://github.com/mbrn/material-table/issues/1340#issuecomment-573429029