-
Notifications
You must be signed in to change notification settings - Fork 2.9k
[DetailsList] Add public focusIndex function #3852
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
[DetailsList] Add public focusIndex function #3852
Conversation
|
FYI: |
|
@hoovercj Thanks, I'll update my PR accordingly. |
…t into magellan/detailsListRowFocus
| this._groupedList && this._groupedList.scrollToIndex(index, measureItem); | ||
| } | ||
|
|
||
| public focusIndex( |
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.
I see a public API being added, but no change to a .types file.
It would also be great to use enzyme and write some tests to cover these things.
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.
Done.
…into magellan/detailsListRowFocus
|
|
||
| this._events.on(window, 'resize', this._onAsyncResize); | ||
| this._events.on(this._root, 'focus', this._onFocus, true); | ||
| if (this._root) { |
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.
This check was needed for the DetailsList tests to render correctly.
* master: (28 commits) Scrollable pane sort stickies (microsoft#4111) Allow ScrollablePane to accept native properties. (microsoft#4095) Sticky (microsoft#4091) Applying package updates. [ColorRectangle, Sticky] Fixed null root refs (microsoft#4099) DatePicker: order of callbacks for onSelectDate and onAfterMenuDismiss (microsoft#4092) Applying package updates. Alhenry fix split button props (microsoft#4090) Fixing ComboBox styling by reverting button classname move (microsoft#4088) Update CODEOWNERS Undoing terrible change. [DetailsList] Fixed focus test (microsoft#4087) Added icons package screener test (microsoft#4082) ContextualMenu: Fix ContextualMenuUtility imports (microsoft#4085) [ContextualMenu] Made disabled buttons focusable (microsoft#4074) Convert Check to mergeStyles (microsoft#3880) [DetailsList] Add public focusIndex function (microsoft#3852) ComboBox button should have data-is-focusable="false" (microsoft#4070) Applying package updates. Focus Zone: Allow Tab to Skip Selection (microsoft#4061) ...
Pull request checklist
$ npm run changeDescription of changes
Exposed the forceIntoFirstElement parameter on the FocusZone component.
Added a public focusIndex function to allow users to programmatically set the focus of a DetailsList.