[EuiSearchBar] Fix multiSelect: false filter behavior#6577
Merged
cee-chen merged 3 commits intoelastic:mainfrom Feb 6, 2023
Merged
[EuiSearchBar] Fix multiSelect: false filter behavior#6577cee-chen merged 3 commits intoelastic:mainfrom
multiSelect: false filter behavior#6577cee-chen merged 3 commits intoelastic:mainfrom
Conversation
- the diff being returned was catching on the first item (now unflagged) and sending that instead - instead of using an unnecessary `.find`, use our new 3rd `changedOption` arg from `EuiSelectable` to immediately get the changed/selected option - nb: this does require flipping all ternaries on `onOptionClick` b/c the new `changedOption` correctly sends the new updated state
Contributor
Author
|
Pinging either @breehall or @JasonStoltz for a review - I'm hoping to get this fix in by 8.7FF next Tuesday, but that maay be a pipe dream |
|
Preview documentation changes for this PR: https://eui.elastic.co/pr_6577/ |
breehall
approved these changes
Feb 6, 2023
Contributor
breehall
left a comment
There was a problem hiding this comment.
Approved! I pulled and tested locally with the in-memory table example and compared it to production. Also ran the new regression tests in Cypress locally and everything passing. Awesome fix Cee!
cee-chen
added a commit
to elastic/kibana
that referenced
this pull request
Feb 9, 2023
## Summary `eui@74.0.1` ⏩ `eui@74.0.2` ___ ## [`74.0.2`](https://github.com/elastic/eui/tree/v74.0.2) **Bug fixes** - Fixed `EuiCard` to ensure `onClick` method only runs once when `title` contains a React node ([#6551](elastic/eui#6551)) - Fixed `EuiSelectable` options with incorrect `aria-posinset` indices when rendered with group labels not at the start of the array ([#6571](elastic/eui#6571)) - Fixed a bug with `EuiSearchBar` where filters with `multiSelect: false` were not able to select a new option when an option was already selected ([#6577](elastic/eui#6577)) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
1Copenut
added a commit
to elastic/kibana
that referenced
this pull request
Feb 14, 2023
## Summary `eui@74.0.2` ⏩ `eui@75.0.0` ___ ## [`75.0.0`](https://github.com/elastic/eui/tree/v75.0.0) - `EuiFlyout`s now automatically shard all fixed `EuiHeader`s on the page. This means that interactions (mouse & keyboard) with items inside `EuiHeader`s when flyouts are open will no longer trigger focus fighting ([#6566](elastic/eui#6566)) - `EuiFlyout`s now read out detailed screen reader dialog instructions and hints on open ([#6566](elastic/eui#6566)) **Bug fixes** - Fixed `EuiSelectable` options with incorrect `aria-posinset` indices when rendered with group labels not at the start of the array ([#6571](elastic/eui#6571)) - Fixed a bug with `EuiSearchBar` where filters with `multiSelect: false` were not able to select a new option when an option was already selected ([#6577](elastic/eui#6577)) **Breaking changes** - Removed the ability to customize the `role` prop of `EuiFlyout`s. `EuiFlyout`s should always be dialog roles for screen reader consistency. ([#6566](elastic/eui#6566)) - Removed `closeButtonAriaLabel` prop from `EuiFlyout` - use `closeButtonProps['aria-label']` instead ([#6566](elastic/eui#6566)) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
justinkambic
pushed a commit
to justinkambic/kibana
that referenced
this pull request
Feb 23, 2023
## Summary `eui@74.0.2` ⏩ `eui@75.0.0` ___ ## [`75.0.0`](https://github.com/elastic/eui/tree/v75.0.0) - `EuiFlyout`s now automatically shard all fixed `EuiHeader`s on the page. This means that interactions (mouse & keyboard) with items inside `EuiHeader`s when flyouts are open will no longer trigger focus fighting ([elastic#6566](elastic/eui#6566)) - `EuiFlyout`s now read out detailed screen reader dialog instructions and hints on open ([elastic#6566](elastic/eui#6566)) **Bug fixes** - Fixed `EuiSelectable` options with incorrect `aria-posinset` indices when rendered with group labels not at the start of the array ([elastic#6571](elastic/eui#6571)) - Fixed a bug with `EuiSearchBar` where filters with `multiSelect: false` were not able to select a new option when an option was already selected ([elastic#6577](elastic/eui#6577)) **Breaking changes** - Removed the ability to customize the `role` prop of `EuiFlyout`s. `EuiFlyout`s should always be dialog roles for screen reader consistency. ([elastic#6566](elastic/eui#6566)) - Removed `closeButtonAriaLabel` prop from `EuiFlyout` - use `closeButtonProps['aria-label']` instead ([elastic#6566](elastic/eui#6566)) --------- Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
closes #6540
closes #6569
Huge shout out to @robert-seymour-numerated for extremely accurately narrowing down the location in our code in which this bug was occurring, saving me a whole bunch of time 🙌
And another bonus shout out to @Heenawter for requesting the new
changedOptionparameter/API that we added in #6487, which made this fix extremely easy and require 0 array iteration/comparison 🎉I recommend checking the git commit messages for more context & detail as to how the fix works.
Before
After
QA
The buggy behavior can be reproduced/compared against production docs.
Regression testing
General checklist
jest andcypress tests