mirror of
https://github.com/vector-im/element-web.git
synced 2026-05-04 19:56:45 +02:00
Remove useless dispatches
This commit is contained in:
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…
x
Reference in New Issue
Block a user