mirror of https://github.com/vector-im/riot-web
Remove useless dispatches
parent
1983591cbf
commit
ceff68476d
|
@ -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});
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue