From ae8b75214a49cb8aceae64cfc61161e45a8299ce Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Tue, 9 Jun 2020 07:58:39 -0600 Subject: [PATCH] Balance out the throttle --- src/components/structures/RoomSearch.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomSearch.tsx b/src/components/structures/RoomSearch.tsx index 671cd89e08..ebfb4e6056 100644 --- a/src/components/structures/RoomSearch.tsx +++ b/src/components/structures/RoomSearch.tsx @@ -83,7 +83,8 @@ export default class RoomSearch extends React.PureComponent { // 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);