fix(deps): update dependency react-select to v4 (#5417)
This commit is contained in:
@ -33,6 +33,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"react-codemirror2": "^7.0.0",
|
||||
"react-select": "^3.0.0"
|
||||
"react-select": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@
|
||||
"build:esm": "cross-env NODE_ENV=esm babel src --out-dir dist/esm --ignore \"**/__tests__\" --root-mode upward"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-select": "^3.0.0",
|
||||
"react-select": "^4.0.0",
|
||||
"react-window": "^1.8.5"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -167,7 +167,7 @@ export default class RelationControl extends React.Component {
|
||||
const { onChange, field } = this.props;
|
||||
|
||||
if (this.isMultiple()) {
|
||||
const options = selectedOption || [];
|
||||
const options = selectedOption;
|
||||
this.setState({ initialOptions: options.filter(Boolean) });
|
||||
const value = options.map(optionToString);
|
||||
const metadata =
|
||||
|
@ -31,6 +31,6 @@
|
||||
"react-immutable-proptypes": "^2.1.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"react-select": "^3.0.0"
|
||||
"react-select": "^4.0.0"
|
||||
}
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ export default class SelectControl extends React.Component {
|
||||
handleChange = selectedOption => {
|
||||
const { onChange, field } = this.props;
|
||||
const isMultiple = field.get('multiple', false);
|
||||
const isEmpty = selectedOption === null;
|
||||
const isEmpty = isMultiple ? !selectedOption?.length : !selectedOption;
|
||||
|
||||
if (field.get('required') && isEmpty && isMultiple) {
|
||||
onChange(List());
|
||||
|
Reference in New Issue
Block a user