Replies: 2 comments
-
Anyone have any ideas on this? Thanks! |
Beta Was this translation helpful? Give feedback.
-
Just ran across a similar if not the same problem. In my case, the default behavior was using the index of the row as the key in the In V8 the
This solved my problem as the expanded state was now keyed off the actual object id. Hope this helps. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks,
In v8 I'm having a problem where expanded rows aren't resetting when I change things in the table. I'd expect this to happen when I sort a column (this seems to be v7 behaviour) or when the data passed in changes. When the row data changes expanded rows stay expanded but it's now a different row (strangely it's not always the row in the same location).
This seems to be the opposite problem to: #3936
I've tried explicitly setting
autoRestExpanding: true
but that didn't change the behaviour.A work around that seems to work is adding an effect like this (though it seems like a bit of a hack):
useEffect(() => table.resetExpanded(), [table, props.data]);
Perhaps something I'm doing that's weird is I'm not using subrows. I'm using
toggleExpanded
directly in onClick and rendering extra<tr>
s by checkinggetIsExpanded
.Thanks!
Beta Was this translation helpful? Give feedback.
All reactions