From 254a2e073663ce39c344cfa6b4e0c851fac35445 Mon Sep 17 00:00:00 2001 From: Zef Hemel Date: Mon, 13 Jun 2022 11:26:39 +0200 Subject: [PATCH] Auto refocus filterbox --- packages/web/components/filter.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/web/components/filter.tsx b/packages/web/components/filter.tsx index 2756709..8a5de0d 100644 --- a/packages/web/components/filter.tsx +++ b/packages/web/components/filter.tsx @@ -131,6 +131,9 @@ export function FilterList({ placeholder={placeholder} ref={searchBoxRef} onChange={filterUpdate} + onBlur={(e) => { + searchBoxRef.current!.focus(); + }} onKeyDown={(e: React.KeyboardEvent) => { // console.log("Key up", e); if (onKeyPress) {