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:
committed by
Linus Flood
parent
dc18589afe
commit
d23137a69d
@@ -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}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user