From 472a3a54ab2e2ac89e1c1af68dffc3f772b17d7f Mon Sep 17 00:00:00 2001 From: Michael Shamoon <4887959+shamoon@users.noreply.github.com> Date: Mon, 7 Mar 2022 09:45:58 -0800 Subject: [PATCH] Allow esc key clearing, autofocus on management lists --- .../correspondent-list/correspondent-list.component.html | 2 +- .../document-type-list/document-type-list.component.html | 2 +- .../components/manage/generic-list/generic-list.component.ts | 4 ++++ .../app/components/manage/tag-list/tag-list.component.html | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.html b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.html index c1ed6649d..f0d89b0bc 100644 --- a/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.html +++ b/src-ui/src/app/components/manage/correspondent-list/correspondent-list.component.html @@ -6,7 +6,7 @@
- +
diff --git a/src-ui/src/app/components/manage/document-type-list/document-type-list.component.html b/src-ui/src/app/components/manage/document-type-list/document-type-list.component.html index cef938e43..77e488c55 100644 --- a/src-ui/src/app/components/manage/document-type-list/document-type-list.component.html +++ b/src-ui/src/app/components/manage/document-type-list/document-type-list.component.html @@ -6,7 +6,7 @@
- +
diff --git a/src-ui/src/app/components/manage/generic-list/generic-list.component.ts b/src-ui/src/app/components/manage/generic-list/generic-list.component.ts index 00b2d91b1..fdfe699b4 100644 --- a/src-ui/src/app/components/manage/generic-list/generic-list.component.ts +++ b/src-ui/src/app/components/manage/generic-list/generic-list.component.ts @@ -125,4 +125,8 @@ export abstract class GenericListComponent implements On set nameFilter(nameFilter: string) { this.nameFilterDebounce.next(nameFilter) } + + onNameFilterKeyUp(event: KeyboardEvent) { + if (event.code == 'Escape') this.nameFilterDebounce.next(null) + } } diff --git a/src-ui/src/app/components/manage/tag-list/tag-list.component.html b/src-ui/src/app/components/manage/tag-list/tag-list.component.html index e6870dffd..3ca89a37f 100644 --- a/src-ui/src/app/components/manage/tag-list/tag-list.component.html +++ b/src-ui/src/app/components/manage/tag-list/tag-list.component.html @@ -6,7 +6,7 @@
- +