From ceff68476dcf92e49b18a730b7e2c3ecd7e9ddc1 Mon Sep 17 00:00:00 2001 From: Jorik Schellekens Date: Fri, 10 Jul 2020 02:25:15 +0100 Subject: [PATCH] Remove useless dispatches --- src/components/structures/RoomSearch.tsx | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/components/structures/RoomSearch.tsx b/src/components/structures/RoomSearch.tsx index 7c5799dcbb..8655db2e8c 100644 --- a/src/components/structures/RoomSearch.tsx +++ b/src/components/structures/RoomSearch.tsx @@ -76,7 +76,6 @@ export default class RoomSearch extends React.PureComponent { private clearInput = () => { if (!this.inputRef.current) return; this.inputRef.current.value = ""; - defaultDispatcher.dispatch({action: Action.StopRoomFilter}); this.onChange(); }; @@ -104,15 +103,9 @@ export default class RoomSearch extends React.PureComponent { private onFocus = (ev: React.FocusEvent) => { this.setState({focused: true}); ev.target.select(); - if (ev.target.value === "") { - defaultDispatcher.dispatch({action: Action.StartRoomFilter}); - } }; private onBlur = (ev: React.FocusEvent) => { - if (ev.target.value === "") { - defaultDispatcher.dispatch({action: Action.StopRoomFilter}); - } this.setState({focused: false}); };