mirror of
https://github.com/element-hq/element-web
synced 2024-11-29 04:48:50 +03:00
Fix RoomView::onSearchClick toggle behaviour (#11605)
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
da1daa1b18
commit
237038aa56
1 changed files with 7 additions and 6 deletions
|
@ -1784,12 +1784,13 @@ export class RoomView extends React.Component<IRoomProps, IRoomState> {
|
|||
};
|
||||
|
||||
private onSearchClick = (): void => {
|
||||
this.setState({
|
||||
timelineRenderingType:
|
||||
this.state.timelineRenderingType === TimelineRenderingType.Search
|
||||
? TimelineRenderingType.Room
|
||||
: TimelineRenderingType.Search,
|
||||
});
|
||||
if (this.state.timelineRenderingType === TimelineRenderingType.Search) {
|
||||
this.onCancelSearchClick();
|
||||
} else {
|
||||
this.setState({
|
||||
timelineRenderingType: TimelineRenderingType.Search,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
private onCancelSearchClick = (): Promise<void> => {
|
||||
|
|
Loading…
Reference in a new issue