menu closing on mobile

This commit is contained in:
Jonas Winkler
2020-11-22 17:48:54 +01:00
parent 8e7a3d309f
commit 6c0e0755b9
2 changed files with 15 additions and 9 deletions

View File

@@ -27,6 +27,10 @@ export class AppFrameComponent implements OnInit, OnDestroy {
isMenuCollapsed: boolean = true
closeMenu() {
this.isMenuCollapsed = true
}
searchField = new FormControl('')
openDocuments: PaperlessDocument[] = []
@@ -63,10 +67,12 @@ export class AppFrameComponent implements OnInit, OnDestroy {
}
search() {
this.closeMenu()
this.router.navigate(['search'], {queryParams: {query: this.searchField.value}})
}
closeAll() {
this.closeMenu()
this.openDocumentsService.closeAll()
// TODO: is there a better way to do this?