Closed magda-tatarynowicz closed 5 years ago
I think the best resolution here is to provide a rowsExpanded
option that works similarly to the rowsSelected
option, so that the state of expandable rows is customizable.
This should also help resolve https://github.com/gregnb/mui-datatables/issues/549, https://github.com/gregnb/mui-datatables/issues/724, https://github.com/gregnb/mui-datatables/issues/518, https://github.com/gregnb/mui-datatables/issues/433, and possibly others.
@gabrielliwerant I'm trying to tackle that option on #800 any feedback would be most appreciated.
No need @Inaia, I've already assigned myself to this issue and am working on it. It will be in the next release.
Feature added in 2.7.0
. Let me know if this satisfies your issue. @lnaia
@gabrielliwerant I am trying to use rowsExpanded
but it does not work on my machine. Using version 2.8.0
. One thing to note is that the type definition for options in the accompanying index.d.t.s
file doesn't have a rowsExpanded
in the interface for Options
. Is this perhaps a bug?
@frahman5 This project does not officially support ts, so any ts support is supplied by users via the definitely typed project (so, not a bug,technically). I'm going to close this particular issue as resolved, but feel free to open a new issue if you have a bug to report, ideally with a minimal example written in js and added to a codesandbox so I can interact with it and we can be sure we're looking at the same thing.
Expected Behavior
When using option serverSide:true, when data in table changes, expanded rows should collapse or it should be possible to manage their state through options.
Current Behavior
Currently rows stay expanded after getting new data (for example by changing page, sorting or filtering).
Steps to Reproduce (for bugs)
Example on codesandbox: https://codesandbox.io/s/awesome-flower-urwc8
You can see that after changing the page row stays expanded, even though there is different data in the table. When data changes, row should collapse.
Your Environment