-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Incorrect row stays expanded after sorting an EuiInMemoryTable #820
Comments
I don't think we can properly support sortable columns when the items don't have associated IDs. The IDs we auto-assign are based on their position in the data, and sorting fundamentally alters this association. You've said before that this data has no guaranteed, unique identifier. You could either stamp the item's original index within the data as its ID, or you could get a hash of the object (e.g. with object-hash to use instead. I can also add a check to |
Looking at the code for the If so, should this behavior be changed, allowing for an Or as a workaround is there some way of collapsing all rows if the user does a sort? |
Indeed. As
|
Is using |
I wouldn't want to assume a field named Adding a new property onto the table that duplicates As the table components' functionality includes a dependency on having IDs outside of selectables, and providing the UI consistency around if/when expanded rows collapse, I do think adding a more generic |
I think we're definitely on the right track here! I do think that this issue is evidence that Here's what I suggest:
The first two will solve Pete's issue, per Chandler's suggestion to supply a UUID to each row on the client-side. I suggest the last bullet since I think it's a design flaw if |
Turns out |
For an
EuiInMemoryTable
with expanded rows, if you expand a row, then sort the rows by clicking on a column header, the same row number stays expanded, showing the content for the item that was previously in that position prior to sorting. The expanded content should move to its new page/row position, or alternatively all rows should be collapsed on sorting.e.g. expand first row, sorted by decreasing severity:
then sort by increasing severity - first row stays expanded, but showing content for previous item in that position:
Found in version 0.0.46
The text was updated successfully, but these errors were encountered: