Skip to content

Commit

Permalink
fix(select): prevent default browser error UI from appearing
Browse files Browse the repository at this point in the history
  • Loading branch information
chirokas committed Nov 4, 2024
1 parent 9fe0aa7 commit 7d6a1aa
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/quick-buses-kick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/select": patch
---

Prevent default browser error UI from appearing.
7 changes: 1 addition & 6 deletions packages/components/select/src/hidden-select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,22 +92,17 @@ export function useHiddenSelect<T>(
inputProps: {
type: "text",
tabIndex: modality == null || state.isFocused || state.isOpen ? -1 : 0,
autoComplete,
value: [...state.selectedKeys].join(",") ?? "",
required: isRequired,
style: {fontSize: 16},
onFocus: () => triggerRef.current?.focus(),
disabled: isDisabled,
// The onChange is handled by the `select` element. This avoids the `form` with input `value`
// and no `onChange` warning.
onChange: () => {},
},
selectProps: {
name,
tabIndex: -1,
autoComplete,
// TODO: Address validation for cases where an option is selected and then deselected.
// required: validationBehavior === "native" && isRequired,
required: isRequired,
disabled: isDisabled,
size: state.collection.size,
value:
Expand Down

0 comments on commit 7d6a1aa

Please sign in to comment.