feat(frontend): add autofocus prop to PersonTypeahead forwarded to text input

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Marcel
2026-04-18 13:53:10 +02:00
parent 57ed9379a2
commit 255eeb660b

View File

@@ -15,6 +15,7 @@ interface Props {
placeholder?: string; placeholder?: string;
compact?: boolean; compact?: boolean;
large?: boolean; large?: boolean;
autofocus?: boolean;
restrictToCorrespondentsOf?: string; restrictToCorrespondentsOf?: string;
onchange?: (value: string) => void; onchange?: (value: string) => void;
onfocused?: () => void; onfocused?: () => void;
@@ -29,6 +30,7 @@ let {
placeholder, placeholder,
compact = false, compact = false,
large = false, large = false,
autofocus = false,
restrictToCorrespondentsOf, restrictToCorrespondentsOf,
onchange, onchange,
onfocused onfocused
@@ -121,6 +123,7 @@ function selectPerson(person: Person) {
type="text" type="text"
id="{name}-search" id="{name}-search"
autocomplete="off" autocomplete="off"
autofocus={autofocus}
bind:value={searchTerm} bind:value={searchTerm}
oninput={handleInput} oninput={handleInput}
onfocus={handleFocus} onfocus={handleFocus}