mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
[Infra and Logs UI] Fixes "sticky filter" problem (#40226)
* Submits query bar form when everything has been deleted and also on blur to prevent sticky value problem * Moved reset to cDU to cover all deleted value cases, not just Backspace
This commit is contained in:
parent
aef6223219
commit
0049345627
1 changed files with 5 additions and 0 deletions
|
@ -65,6 +65,7 @@ export class AutocompleteField extends React.Component<
|
|||
onKeyDown={this.handleKeyDown}
|
||||
onKeyUp={this.handleKeyUp}
|
||||
onSearch={this.submit}
|
||||
onBlur={this.submit}
|
||||
placeholder={placeholder}
|
||||
value={value}
|
||||
/>
|
||||
|
@ -100,6 +101,10 @@ export class AutocompleteField extends React.Component<
|
|||
this.updateSuggestions();
|
||||
}
|
||||
|
||||
if (hasNewValue && this.props.value === '') {
|
||||
this.submit();
|
||||
}
|
||||
|
||||
if (hasNewSuggestions && this.state.isFocused) {
|
||||
this.showSuggestions();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue