1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Fix reset select value

Signed-off-by: DmitriyNoa <dmytro.zharkov@gmail.com>
This commit is contained in:
DmitriyNoa 2022-03-02 16:09:33 +01:00
parent 2bed34ccd5
commit 55b99c2eb6

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,