Allow swipe to close the sidebar after search is cancelled (#4688) (#4697)

(cherry picked from commit 033cdfc459)

Co-authored-by: Elias Nahum <nahumhbl@gmail.com>
This commit is contained in:
Mattermost Build 2020-08-18 18:23:11 -04:00 committed by GitHub
parent 1082f08757
commit 031bac9863
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -50,7 +50,7 @@ export default class MainSidebarIOS extends MainSidebarBase {
if (this.state.drawerOpened && this.drawerRef?.current) {
this.drawerRef.current.closeDrawer();
} else if (this.drawerSwiper && DeviceTypes.IS_TABLET) {
this.resetDrawer(true);
this.resetDrawer();
}
};

View file

@ -156,6 +156,9 @@ export default class MainSidebarBase extends Component {
onSearchEnds = () => {
this.setState({searching: false});
if (this.drawerRef?.current) {
this.drawerRef.current.canClose = true;
}
};
onSearchStart = () => {