mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Don't clear searchValue on CommandDialog onBlur (#3172)
Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
parent
8ac3203924
commit
b2836eb57a
@ -35,6 +35,7 @@ import { clusterViewURL } from "../../../common/routes";
|
||||
@observer
|
||||
export class CommandDialog extends React.Component {
|
||||
@observable menuIsOpen = true;
|
||||
@observable searchValue: any = undefined;
|
||||
|
||||
constructor(props: {}) {
|
||||
super(props);
|
||||
@ -104,14 +105,24 @@ export class CommandDialog extends React.Component {
|
||||
return (
|
||||
<Select
|
||||
menuPortalTarget={null}
|
||||
onChange={(v) => this.onChange(v.value)}
|
||||
components={{ DropdownIndicator: null, IndicatorSeparator: null }}
|
||||
onChange={v => this.onChange(v.value)}
|
||||
components={{
|
||||
DropdownIndicator: null,
|
||||
IndicatorSeparator: null,
|
||||
}}
|
||||
menuIsOpen={this.menuIsOpen}
|
||||
options={this.options}
|
||||
autoFocus={true}
|
||||
escapeClearsValue={false}
|
||||
data-test-id="command-palette-search"
|
||||
placeholder="Type a command or search…" />
|
||||
placeholder="Type a command or search…"
|
||||
onInputChange={(newValue, { action }) => {
|
||||
if (action === "input-change") {
|
||||
this.searchValue = newValue;
|
||||
}
|
||||
}}
|
||||
inputValue={this.searchValue}
|
||||
/>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user