Fix form input label id for tags

This commit is contained in:
Sam Becker 2024-03-12 09:02:13 -05:00
parent a998880c8d
commit 49f2102913
2 changed files with 4 additions and 0 deletions

View File

@ -93,6 +93,7 @@ export default function FieldSetWithStatus({
</select> </select>
: tagOptions : tagOptions
? <TagInput ? <TagInput
id={id}
name={id} name={id}
value={value} value={value}
options={tagOptions} options={tagOptions}

View File

@ -10,6 +10,7 @@ const ARIA_ID_TAG_CONTROL = 'tag-control';
const ARIA_ID_TAG_OPTIONS = 'tag-options'; const ARIA_ID_TAG_OPTIONS = 'tag-options';
export default function TagInput({ export default function TagInput({
id,
name, name,
value = '', value = '',
options = [], options = [],
@ -17,6 +18,7 @@ export default function TagInput({
className, className,
readOnly, readOnly,
}: { }: {
id?: string
name: string name: string
value?: string value?: string
options?: AnnotatedTag[] options?: AnnotatedTag[]
@ -249,6 +251,7 @@ export default function TagInput({
{option} {option}
</span>)} </span>)}
<input <input
id={id}
ref={inputRef} ref={inputRef}
type="text" type="text"
className={clsx( className={clsx(