diff --git a/common/changes/office-ui-fabric-react/bugFix3571_2018-02-21-04-00.json b/common/changes/office-ui-fabric-react/bugFix3571_2018-02-21-04-00.json new file mode 100644 index 0000000000000..0a90657821fdc --- /dev/null +++ b/common/changes/office-ui-fabric-react/bugFix3571_2018-02-21-04-00.json @@ -0,0 +1,11 @@ +{ + "changes": [ + { + "packageName": "office-ui-fabric-react", + "comment": "Dropdown: Fixed custom render option in multi select.", + "type": "patch" + } + ], + "packageName": "office-ui-fabric-react", + "email": "jindal.rohit018@gmail.com" +} diff --git a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.tsx b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.tsx index 24a041f7d1d8b..353218ff72dc8 100644 --- a/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.tsx +++ b/packages/office-ui-fabric-react/src/components/Dropdown/Dropdown.tsx @@ -518,6 +518,7 @@ export class Dropdown extends BaseComponent{ onRenderOption(item, this._onRenderOption) } - + /> ) ); } @@ -548,6 +548,13 @@ export class Dropdown extends BaseComponent{ item.text }; } + // Render custom label for drop down item + @autobind + private _onRenderLabel(item: IDropdownOption) { + const { onRenderOption = this._onRenderOption } = this.props; + return onRenderOption(item, this._onRenderOption); + } + @autobind private _onPositioned() { this._focusZone.focus();