Fix reset select value

Signed-off-by: DmitriyNoa <dmytro.zharkov@gmail.com>
This commit is contained in:
DmitriyNoa committed 2022-03-03 14:40:53 +01:00
1 parent 2bed34ccd5
commit 55b99c2eb6
1 file changed
+3 -1
+3 -1
View File
@@ -78,7 +78,7 @@ export class Select extends React.Component<SelectProps> {
});
}
return this.options.find(opt => opt === value || opt.value === value);
return this.options.find(opt => opt === value || opt.value === value) || null;
}
@computed get options(): SelectOption[] {
@@ -117,6 +117,8 @@ export class Select extends React.Component<SelectProps> {
} = this.props;
const WrappedMenu = components.Menu ?? Menu;
console.log("this.selectedOption", this.selectedOption);
const selectProps: Partial<SelectProps> = {
...props,
styles: this.styles,