ComboBox: Make comboBox menus wrap#4482
Merged
jspurlin merged 6 commits intomicrosoft:masterfrom Apr 7, 2018
Merged
Conversation
christiango
reviewed
Apr 6, 2018
| // item is not focusable), otherwise use the updated index | ||
| if (index === indexUpdate) { | ||
| if (searchDirection === SearchDirection.forward) { | ||
| index = this._getNextSelectableIndex(-1, searchDirection); |
Member
There was a problem hiding this comment.
I'm not super familiar with this codepath, does the unit test cover the code in the if(index == indexUpdate ) branch?
Contributor
Author
There was a problem hiding this comment.
Good call. I've added another test to exercise this codepath
christiango
approved these changes
Apr 7, 2018
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Pull request checklist
$ npm run changeDescription of changes
This PR updates comboBoxes so that arrowing through the items will wrap at the top and bottom. As a result comboBoxes will behave like dropdowns (and we also got customer feedback that they expected focus to loop around the items)
Focus areas to test
Verified that focus wraps from top to bottom and bottom to top in a flat list, a list that starts/ends with a non-focusable element (like a header or divider), and that this works with dynamically loaded items