-
Notifications
You must be signed in to change notification settings - Fork 839
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[EuiSelectable] Fix searchable single selection selectables not corre…
…ctly highlighting the checked option on initial render (#6072) * Fix activeIndex being incorrectly set to undefined on mount for `singleSelection` `searchable` EuiSelectables `Euiselectable.onSearchChange` being called on mount by `EuiSelectableSearch` which was setting `activeOptionIndex` to undefined. Moving the call to the `EuiSelectable.constructor` (which calls getMatchingOptions on mount anyway, so no need for `EuiSelectableSearch` to repeat it fixes the issue and leaves the found `activeOptionIndex` from the constructor intact. * [Misc bugfix] Fix onFocus progressing when it shouldn't if `activeOptionIndex` is a 0 index since 0 is falsey but we really should be checking for undefined * [Misc cleanup] Remove unused class method - doesn't appear to be used anywhere * Changelog
- Loading branch information
Constance
authored
Jul 25, 2022
1 parent
5310bfb
commit 4018c82
Showing
5 changed files
with
25 additions
and
25 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
**Bug fixes** | ||
|
||
- Fixed searchable single selection `EuiSelectable`s not correctly highlighting the checked option on initial render |