Fix "Select all" option in SelectControl (#11692)

This commit is contained in:
Kamil Gabryjelski 2020-11-17 02:23:32 +01:00 committed by GitHub
parent 274420bc5a
commit 8a39f2799a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 5 deletions

View File

@ -109,11 +109,9 @@ export default class SelectControl extends React.PureComponent {
opt.forEach(o => {
// select all options
if (o.meta === true) {
this.props.onChange(
this.getOptions(this.props)
.filter(x => !x.meta)
.map(x => x[this.props.valueKey]),
);
optionValue = this.getOptions(this.props)
.filter(x => !x.meta)
.map(x => x[this.props.valueKey]);
return;
}
optionValue.push(o[this.props.valueKey] || o);