-
Notifications
You must be signed in to change notification settings - Fork 834
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
change default InMemoryTable sorting behavior #1591
change default InMemoryTable sorting behavior #1591
Conversation
Congrats on your first EUI PR! 😆 As a quick etiquette rule for our PR's, the PR template that has the checklist needs to be kept in the PR summary. It helps remind of all the things that we need to add alongside what the PR is actually addressing like a changelog entry and adding/updating any tests. You can strike out any items that don't make sense though. But we do need keep the whole thing in the summary. |
Thanks! Could you update the comment regarding initial sorting behavior and client sort logic? The statements are now misleading, given your changes. eui/src/components/basic_table/in_memory_table.js Lines 359 to 362 in 4e08b08
|
@thompsongl done |
This is all done in |
@cchaos I updated the aria labels and added a flag so that BasicTable could support both modes (with and without neutral sort). I didn't expose the flag in the InMemoryTable api yet. Should I? And if so, what should be the default? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank you for fixing the screen reader stuff.
I just had some comments about making the prop on InMemoryTable overridable, and adding prop documentation.
You'll also want to be sure to rebase with master and create a changelog entry.
@cchaos done review |
@cchaos @thompsongl we're good to merge? |
CHANGELOG.md
Outdated
@@ -1,5 +1,6 @@ | |||
## [`master`](https://github.com/elastic/eui/tree/master) | |||
|
|||
- Added `allowallowNeutralSort` prop to `EuiInMemoryTable` to support unsorting table columns ([#1591](https://github.com/elastic/eui/pull/1591)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a type in CL
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Docs look good, ty! I just saw a typo in the CL but other than that LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allowNeutralSort
is still being passed through to the EuiBasicTable
div
element.
It's causing Warning: React does not recognize the 'allowNeutralSort' prop on a DOM element
console warnings.
You'll need to remove it from the rest
object before it gets spread onto the base div
in basic_table.js
Note: You don't see this happen when allowNeutralSort
uses the default value. It occurs when explicitly setting the prop on EuiInMemoryTable
Once it's in master, how can I start using it in Kibana? |
Summary
This PR changes the default InMemoryTable sorting logic.
It now uses a three way sort on a field ASC -> DESC -> neutral
Blocker for EUIfication of visualizations \ dashboards screens on Kibana
Checklist