1
0
mirror of https://github.com/matrix-org/matrix-react-sdk.git synced 2025-11-05 23:10:41 +03:00

Balance out the throttle

This commit is contained in:
Travis Ralston
2020-06-09 07:58:39 -06:00
parent 6c4c581f8f
commit ae8b75214a

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
// tslint:disable-next-line
private onSearchUpdated = throttle(() => {
private onSearchUpdated = throttle(
() => {
// 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.
this.props.onQueryUpdate(this.inputRef.current.value);