-
Notifications
You must be signed in to change notification settings - Fork 298
Highlight first item in menus upon filtering #2632
Highlight first item in menus upon filtering #2632
Conversation
* If the user moves through the menu then resumes typing, the `selectedIndex` can end up larger than the contents of the menu. This can cause errors, or at least graphical glitches, and seems odd. * So reset the `selectedIndex` to zero whenever a menu's filter is updated, meaning the first element in the menu will be highlighted.
* This method potentially suffers from issues of not updating the `selectedIndex` after filtering the menu items, causing array bounds errors. * However, the related methods are completely unused, so just remove them.
Some pics highlighting the issue You can see no option is highlighted, and the following exception occurs
|
Codecov Report
@@ Coverage Diff @@
## master #2632 +/- ##
==========================================
+ Coverage 45.33% 45.38% +0.05%
==========================================
Files 361 361
Lines 14572 14559 -13
Branches 1913 1910 -3
==========================================
+ Hits 6606 6608 +2
+ Misses 7741 7725 -16
- Partials 225 226 +1
Continue to review full report at Codecov.
|
@feltech I noticed that this PR removes the details code, I'm wondering if this impacts rendering of the documentation section for the autocomplete menu? |
I believe the code responsible for processing a |
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.
Great going to bring this in now thanks for the PR 👍
If the user moves through the menu then resumes typing, the
selectedIndex
can end up larger than the contents of the menu. Thiscan cause errors, or at least graphical glitches, and seems odd.