From fc220204b1f8a6d3ff02ba756cfc4b15f6c32add Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kari=20S=C3=B6derholm?= Date: Wed, 29 Sep 2021 12:39:42 +0300 Subject: [PATCH] Trigger find on Enter key in FindOwnersView --- frontend/views/owners/find-owners-view.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/frontend/views/owners/find-owners-view.ts b/frontend/views/owners/find-owners-view.ts index 475a141..4fe938a 100644 --- a/frontend/views/owners/find-owners-view.ts +++ b/frontend/views/owners/find-owners-view.ts @@ -22,7 +22,14 @@ export class FindOwnersView extends View { return html`

Find Owners

- + Find Owner
@@ -36,6 +43,12 @@ export class FindOwnersView extends View { this.lastName = textField.value; } + textFieldKeyUp(event: KeyboardEvent) { + if (event.key === 'Enter') { + this.findOwner(); + } + } + findOwner() { let targetUrl = router.urlForName('owners-list'); if (this.lastName !== '') {