Skip to content

Commit

Permalink
[Infra and Logs UI] Fixes "sticky filter" problem (elastic#40226) (el…
Browse files Browse the repository at this point in the history
…astic#40285)

* 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
  • Loading branch information
jasonrhodes authored Jul 22, 2019
1 parent e8385ac commit 31d98ad
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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}
/>
Expand Down Expand Up @@ -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();
}
Expand Down

0 comments on commit 31d98ad

Please sign in to comment.