- Preparing search index...
- The search index is not available
docs.hg.fi
- useSelectField<T>(label: string, key: string, change: FieldChangeCallback<T>, changeState: FieldChangeCallback<FormFieldState>, propsValue: T, propsValues: readonly SelectFieldItem<T>[], isRequired: boolean, closeDropdownTimeoutOnBlur: number, moveToItemOnOpenDropdownTimeout: number): {
buttonRefs: RefObject<HTMLButtonElement>[];
currentItemIndex: number;
currentItemLabel: string;
dropdownOpen: boolean;
fieldState: FormFieldState;
inputRef: MutableRefObject<HTMLInputElement>;
label: string;
onBlurCallback: (() => void);
onChangeCallback: ((event: ChangeEvent<HTMLInputElement>) => void);
onFocusCallback: (() => void);
onKeyDownCallback: ((event: KeyboardEvent<Element>) => void);
searchField: string;
selectItemCallback: SelectItemCallback;
}
-
Parameters
-
label: string
-
key: string
-
-
-
propsValue: T
-
-
isRequired: boolean
-
closeDropdownTimeoutOnBlur: number
-
moveToItemOnOpenDropdownTimeout: number
Returns {
buttonRefs: RefObject<HTMLButtonElement>[];
currentItemIndex: number;
currentItemLabel: string;
dropdownOpen: boolean;
fieldState: FormFieldState;
inputRef: MutableRefObject<HTMLInputElement>;
label: string;
onBlurCallback: (() => void);
onChangeCallback: ((event: ChangeEvent<HTMLInputElement>) => void);
onFocusCallback: (() => void);
onKeyDownCallback: ((event: KeyboardEvent<Element>) => void);
searchField: string;
selectItemCallback: SelectItemCallback;
}
-
buttonRefs: RefObject<HTMLButtonElement>[]
-
currentItemIndex: number
-
currentItemLabel: string
-
dropdownOpen: boolean
-
-
inputRef: MutableRefObject<HTMLInputElement>
-
label: string
-
onBlurCallback: (() => void)
-
onChangeCallback: ((event: ChangeEvent<HTMLInputElement>) => void)
-
- (event: ChangeEvent<HTMLInputElement>): void
-
Parameters
-
event: ChangeEvent<HTMLInputElement>
Returns void
-
onFocusCallback: (() => void)
-
onKeyDownCallback: ((event: KeyboardEvent<Element>) => void)
-
- (event: KeyboardEvent<Element>): void
-
Parameters
-
event: KeyboardEvent<Element>
Returns void
-
searchField: string
-