Skip to content
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

Fix bug in EuiInMemoryTable to not mutate the items prop #1057

Merged

Conversation

chandlerprall
Copy link
Contributor

Fixes #860

EuiInMemoryTable's sorting operated on the saved reference to its items prop, and JS's sorting mutates the source which meant the original items array was itself sorted. Visually this caused non-deterministic sorting behaviour on the tables.

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM! I tested in browser and verified this fixes the problem. Great work!

@chandlerprall chandlerprall merged commit 34d064c into elastic:master Jul 31, 2018
@chandlerprall chandlerprall deleted the bug/860-deterministic-table-sort branch July 31, 2018 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants