-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Discover] Remove column from sorting array when removed from table #65990
[Discover] Remove column from sorting array when removed from table #65990
Conversation
@elasticmachine merge upstream |
…on-column-removal
@elasticmachine merge upstream |
Pinging @elastic/kibana-app (Team:KibanaApp) |
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
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.
Tested, works as expected - removing a column which is sorted by and re-adding it will remove the sort. LGTM
Thanks for adding a functional test. It could be made slightly more stable by not checking the URL but whether the little triangle in the column header is not rendered after adding the column again. Not a blocker though.
thx @flash1293, good reminder about the potential flakiness, so I started a flaky test runner to be sure |
Summary
When you removed a column in Discover, that was part of the sorting array, the sorting by this field was still active, and there was no way to remove it except modifying the URL. This caused confusion especially when you switched index pattern. The suggested solution is automatically removing the field from the sorting array, when you remove the column from the table.
Fixes #54345
How to test
sort:
part.sort:
part.Checklist
Delete any items that are not applicable to this PR.