Dropdown: Custom render options for multiselect - Bug fix #3571 #3589
Dropdown: Custom render options for multiselect - Bug fix #3571 #3589dzearing merged 7 commits intomicrosoft:masterfrom
Conversation
|
@jakob101 Can you please review the changes |
|
Yeah, give me a sec ;)
…________________________________
From: Rohit Jindal <notifications@github.com>
Sent: Monday, December 18, 2017 5:34:01 PM
To: OfficeDev/office-ui-fabric-react
Cc: Jakob Werner; Mention
Subject: Re: [OfficeDev/office-ui-fabric-react] Bug fix #3571 (#3589)
@jakob101<https://github.com/jakob101> Can you please review the changes
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#3589 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AA-v2q0xHgvtGwWiRdQ7CnO8v55VO9AQks5tBpP5gaJpZM4RElL->.
|
|
@jakob101 Are any changes required in the code? |
erichdev
left a comment
There was a problem hiding this comment.
Please also add a change file
| onMouseMove: this._onItemMouseMove.bind(this, item) | ||
| } } | ||
| label={ item.text } | ||
| onRenderLabel={ this._renderCustomLabel.bind(this, item) } |
There was a problem hiding this comment.
Use @autobind. Also, _onRenderLabel might be a better name to match existing naming conventions in this file
| } | ||
|
|
||
| } | ||
| private _renderCustomLabel(item: IDropdownOption) { |
There was a problem hiding this comment.
Minor -- I don't think Fabric has any style guidelines on this, but I'd move this method up with all the other render functions, around line 545
|
Hi @rohitjindal18, this has been open for a while. The comments are simple to fix. Do you still want to merge this? |
|
@manishgarg1 Have fixed the review comments, one screener check is not passing, saw the dashboard, there is visual change in multi select example for dropdown, but doesn't look like an issue. |
|
We need a change file here. You can run |
|
Added change file @dzearing @manishgarg1 |
* master: (30 commits) Addressing Issue microsoft#4147 - Nav Buttons have invalid `aria-describedby` value (microsoft#4159) Fix issue 3608: DetailsList horizontal scroll (microsoft#4164) Update package.json Image SCSS to MergeStyles Part 2: Style Conversion (microsoft#4151) Applying package updates. [SpinButton] Consistent styles to Button and TextField (microsoft#4098) ChoiceGroup: Flex layout for image and icon options (microsoft#4137) Initial set of Keytips work in experiments (microsoft#4062) Updating tsconfig in button bundle. BaseExtendedPicker: Create contextmenu for renderedItem, fix auto focus (microsoft#3954) Dropdown: Custom render options for multiselect - Bug fix microsoft#3571 (microsoft#3589) Fix documentcard theming (microsoft#4155) BasePicker: Fix not used onBlur callback of inputProps (microsoft#4000) (microsoft#4131) Allow Elements as Callout targets (microsoft#4134) CommandBar: Fixed null commandItemWidths (microsoft#4136) add check for when this.suggestionElement may be undefined (microsoft#4157) Addressing Issue microsoft#4143 - is-selected missing on ms-Nav-link (microsoft#4158) Aria selected (microsoft#4161) Move fabric to TypeScript 2.7.2 (microsoft#4153) Updating SearchBox examples to have the removed string in placeholder prop. ...
* master: (51 commits) Applying package updates. No unused variable (microsoft#4173) Use correct _list ref string (microsoft#4168) Nav: wire a link to expand/collapse behavior if it has no URL but has children (microsoft#4171) Addressing Issue microsoft#4147 - Nav Buttons have invalid `aria-describedby` value (microsoft#4159) Fix issue 3608: DetailsList horizontal scroll (microsoft#4164) Update package.json Image SCSS to MergeStyles Part 2: Style Conversion (microsoft#4151) Applying package updates. [SpinButton] Consistent styles to Button and TextField (microsoft#4098) ChoiceGroup: Flex layout for image and icon options (microsoft#4137) Initial set of Keytips work in experiments (microsoft#4062) Updating tsconfig in button bundle. BaseExtendedPicker: Create contextmenu for renderedItem, fix auto focus (microsoft#3954) Dropdown: Custom render options for multiselect - Bug fix microsoft#3571 (microsoft#3589) Fix documentcard theming (microsoft#4155) BasePicker: Fix not used onBlur callback of inputProps (microsoft#4000) (microsoft#4131) Allow Elements as Callout targets (microsoft#4134) CommandBar: Fixed null commandItemWidths (microsoft#4136) add check for when this.suggestionElement may be undefined (microsoft#4157) ...
Pull request checklist
onRenderOptiondoesnt work. #3571$ npm run changeDescription of changes
Dropdown used Checkbox component in case of multiselect mode, and CommandButton component in case of non multiselect mode.
onRenderOption was not getting used in Dropdown multiselect Mode, onRenderOption was being passed as Checkbox children, but Checkbox was not making use of its children, instead it accepts a onRenderLabel prop to render custom JSX.
Passed onRenderOption in onRenderLabel props
Focus areas to test
Pass multiSelect as true and onRenderOption to render custom JXS for Dropdown options.