Merged in fix(BOOK-659)-multiroom-name-check (pull request #3385)

fix(BOOK-659): use unique ids for multiroom booking input fields

* fix(BOOK-659): use unique ids for multiroom booking input fields


Approved-by: Bianca Widstam
Approved-by: Linus Flood
This commit is contained in:
Matilda Landström
2026-01-05 11:20:20 +00:00
committed by Linus Flood
parent dc18589afe
commit d23137a69d
5 changed files with 12 additions and 2 deletions

View File

@@ -35,6 +35,7 @@ export const FormInput = forwardRef<HTMLInputElement, FormInputProps>(
labelPosition = 'floating',
maxLength,
name,
id,
placeholder,
readOnly = false,
registerOptions = {},
@@ -88,7 +89,7 @@ export const FormInput = forwardRef<HTMLInputElement, FormInputProps>(
onChange={field.onChange}
value={field.value ?? ''}
autoComplete={autoComplete}
id={field.name}
id={id ?? field.name}
label={label}
labelPosition={labelPosition}
maxLength={maxLength}

View File

@@ -9,6 +9,8 @@ export interface FormInputProps extends InputProps {
description?: string
/** Icon to display with the description text. Defaults to 'info' */
descriptionIcon?: MaterialIconProps['icon']
/** Field id for react-hook-form registration */
id?: string
/** Field name for react-hook-form registration */
name: string
/** react-hook-form validation rules */