Balance out the throttle

pull/21833/head
Travis Ralston 2020-06-09 07:58:39 -06:00
parent 6c4c581f8f
commit ae8b75214a
1 changed files with 2 additions and 1 deletions

View File

@ -83,7 +83,8 @@ export default class RoomSearch extends React.PureComponent<IProps, IState> {
// it wants this at the top of the file, but we know better // it wants this at the top of the file, but we know better
// tslint:disable-next-line // tslint:disable-next-line
private onSearchUpdated = throttle(() => { private onSearchUpdated = throttle(
() => {
// We can't use the state variable because it can lag behind the input. // We can't use the state variable because it can lag behind the input.
// The lag is most obvious when deleting/clearing text with the keyboard. // The lag is most obvious when deleting/clearing text with the keyboard.
this.props.onQueryUpdate(this.inputRef.current.value); this.props.onQueryUpdate(this.inputRef.current.value);