Skip to content

Conversation

@lambertwang-zz
Copy link

@lambertwang-zz lambertwang-zz commented Jan 31, 2018

Pull request checklist

Description 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.

@joschect joschect requested a review from ThomasMichon February 1, 2018 01:22
@hoovercj
Copy link
Member

hoovercj commented Feb 15, 2018

FYI: ForceIntoFirstChild should be fixed in #3961

@lambertwang-zz
Copy link
Author

@hoovercj Thanks, I'll update my PR accordingly.

@lambertwang-zz lambertwang-zz changed the title [Focus] Enable forceIntoFirstElement parameter & [DetailsList] Add public focusIndex function [DetailsList] Add public focusIndex function Feb 21, 2018
this._groupedList && this._groupedList.scrollToIndex(index, measureItem);
}

public focusIndex(
Copy link
Member

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.


this._events.on(window, 'resize', this._onAsyncResize);
this._events.on(this._root, 'focus', this._onFocus, true);
if (this._root) {
Copy link
Author

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.

@lambertwang-zz lambertwang-zz merged commit d2c5b24 into microsoft:master Feb 23, 2018
Markionium added a commit to Markionium/office-ui-fabric-react that referenced this pull request Feb 27, 2018
* 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)
  ...
@microsoft microsoft locked as resolved and limited conversation to collaborators Aug 31, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DetailsList: Programmatically focus row cells

5 participants