From 475dbe03c4346e1623c1c13b81f04cb899928dea Mon Sep 17 00:00:00 2001 From: Felix Zett Date: Fri, 19 Sep 2025 22:33:38 +0200 Subject: [PATCH] fix: correct type for tagAutocomplete state in ItemsPage component --- frontend/src/components/ItemRow.tsx | 2 +- frontend/src/pages/ItemsPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/ItemRow.tsx b/frontend/src/components/ItemRow.tsx index d798e05..51eac63 100644 --- a/frontend/src/components/ItemRow.tsx +++ b/frontend/src/components/ItemRow.tsx @@ -180,7 +180,7 @@ export default function ItemRow({ setAutocompleteIndex(0); // keep addingTag true so you can add another tag setTimeout(() => { - e.target.focus(); + (e.target as HTMLInputElement).focus(); }, 0); } return; diff --git a/frontend/src/pages/ItemsPage.tsx b/frontend/src/pages/ItemsPage.tsx index e9abc37..5f011a2 100644 --- a/frontend/src/pages/ItemsPage.tsx +++ b/frontend/src/pages/ItemsPage.tsx @@ -42,7 +42,7 @@ export default function ItemsPage() { const [adding, setAdding] = useState(false); const inputRef = useRef(null); - const [tagAutocomplete, setTagAutocomplete] = useState<{name: string, id: string}[]>([]); + const [tagAutocomplete, setTagAutocomplete] = useState([]); const [autocompleteActive, setAutocompleteActive] = useState(false); const [autocompleteIndex, setAutocompleteIndex] = useState(0);