Remove useless dispatches
This commit is contained in:
parent
1983591cbf
commit
ceff68476d
1 changed files with 0 additions and 7 deletions
|
@ -76,7 +76,6 @@ export default class RoomSearch extends React.PureComponent<IProps, IState> {
|
||||||
private clearInput = () => {
|
private clearInput = () => {
|
||||||
if (!this.inputRef.current) return;
|
if (!this.inputRef.current) return;
|
||||||
this.inputRef.current.value = "";
|
this.inputRef.current.value = "";
|
||||||
defaultDispatcher.dispatch({action: Action.StopRoomFilter});
|
|
||||||
this.onChange();
|
this.onChange();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -104,15 +103,9 @@ export default class RoomSearch extends React.PureComponent<IProps, IState> {
|
||||||
private onFocus = (ev: React.FocusEvent<HTMLInputElement>) => {
|
private onFocus = (ev: React.FocusEvent<HTMLInputElement>) => {
|
||||||
this.setState({focused: true});
|
this.setState({focused: true});
|
||||||
ev.target.select();
|
ev.target.select();
|
||||||
if (ev.target.value === "") {
|
|
||||||
defaultDispatcher.dispatch({action: Action.StartRoomFilter});
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
private onBlur = (ev: React.FocusEvent<HTMLInputElement>) => {
|
private onBlur = (ev: React.FocusEvent<HTMLInputElement>) => {
|
||||||
if (ev.target.value === "") {
|
|
||||||
defaultDispatcher.dispatch({action: Action.StopRoomFilter});
|
|
||||||
}
|
|
||||||
this.setState({focused: false});
|
this.setState({focused: false});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue