mirror of https://github.com/vector-im/riot-web
Balance out the throttle
parent
6c4c581f8f
commit
ae8b75214a
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue