Remove useless dispatches

pull/21833/head
Jorik Schellekens 2020-07-10 02:25:15 +01:00
parent 1983591cbf
commit ceff68476d
1 changed files with 0 additions and 7 deletions

View File

@ -76,7 +76,6 @@ export default class RoomSearch extends React.PureComponent<IProps, IState> {
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<IProps, IState> {
private onFocus = (ev: React.FocusEvent<HTMLInputElement>) => {
this.setState({focused: true});
ev.target.select();
if (ev.target.value === "") {
defaultDispatcher.dispatch({action: Action.StartRoomFilter});
}
};
private onBlur = (ev: React.FocusEvent<HTMLInputElement>) => {
if (ev.target.value === "") {
defaultDispatcher.dispatch({action: Action.StopRoomFilter});
}
this.setState({focused: false});
};