Skip to content

Commit

Permalink
chore(autocomplete): add default values
Browse files Browse the repository at this point in the history
  • Loading branch information
wingkwong committed Oct 6, 2024
1 parent f8cce31 commit 1a84b7b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/components/autocomplete/src/use-autocomplete.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,9 @@ export function useAutocomplete<T extends object>(originalProps: UseAutocomplete
inputRef,
hiddenInputRef,
name: originalProps?.name,
isRequired: originalProps?.isRequired,
autoComplete: originalProps?.autoComplete,
isDisabled: originalProps?.isDisabled,
isRequired: originalProps?.isRequired ?? false,
autoComplete: originalProps?.autoComplete ?? "on",
isDisabled: originalProps?.isDisabled ?? false,
onChange,
...props,
}),
Expand All @@ -575,8 +575,8 @@ export function useAutocomplete<T extends object>(originalProps: UseAutocomplete

// store the data to be used in useHiddenInput
inputData.set(state, {
isDisabled: originalProps?.isDisabled,
isRequired: originalProps?.isRequired,
isDisabled: originalProps?.isDisabled ?? false,
isRequired: originalProps?.isRequired ?? false,
name: originalProps?.name,
// TODO: Future enhancement to support "aria" validation behavior.
validationBehavior: "native",
Expand Down

0 comments on commit 1a84b7b

Please sign in to comment.