refactor(react/note_icon): introduce autofocus at text box level

This commit is contained in:
Elian Doran
2025-08-21 15:11:08 +03:00
parent 076c0321cf
commit b213453062
2 changed files with 9 additions and 7 deletions

View File

@@ -102,11 +102,6 @@ function NoteIconList() {
loadIcons();
}, [ search, categoryId ]);
// Focus on search by default.
useEffect(() => {
searchBoxRef?.current?.focus();
}, []);
return (
<>
<div class="filter-row">
@@ -124,6 +119,7 @@ function NoteIconList() {
type="text"
name="icon-search"
currentValue={search} onChange={setSearch}
autoFocus
/>
</div>