Skip to content

Commit

Permalink
Pickers: Fix suggestions not having proper value selected (#4408)
Browse files Browse the repository at this point in the history
* Revert "FocusTrapZone does not correctly trap focus when last child is FocusZone (#4172)"

This reverts commit 699fa69.

* fix picker suggestions and add many tests

* adding snap file

* adding change file

* improve test

* fix tests and config

* revert test changes

* last test update

* update test name and snapshot

* remove tests to expedite checkin
  • Loading branch information
joschect authored Mar 30, 2018
1 parent 5d1646f commit 51a29f2
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"changes": [
{
"packageName": "office-ui-fabric-react",
"comment": "Pickers: fix bug where suggestions wouldn't have correct value selected",
"type": "patch"
}
],
"packageName": "office-ui-fabric-react",
"email": "[email protected]"
}
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export class Suggestions<T> extends BaseComponent<ISuggestionsProps<T>, ISuggest
>
{ suggestions.map((suggestion, index) =>
<div
ref={ this._selectedElement }
ref={ suggestion.selected ? this._selectedElement : '' }
// tslint:disable-next-line:no-string-literal
key={ (suggestion.item as any)['key'] ? (suggestion.item as any)['key'] : index }
id={ 'sug-' + index }
Expand Down

0 comments on commit 51a29f2

Please sign in to comment.