Skip to content

Commit

Permalink
Fix/select label closes the popover (#1455)
Browse files Browse the repository at this point in the history
* fix(select): label pointer events removed

* chore(select): changeset
  • Loading branch information
jrgarciadev committed Aug 21, 2023
1 parent c9e5c2e commit cc839cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/ninety-planets-float.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@nextui-org/theme": patch
---

Fix select close when clicking the label
5 changes: 2 additions & 3 deletions packages/core/theme/src/components/select.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {tv} from "../utils/tv";
const select = tv({
slots: {
base: "group inline-flex flex-col relative w-full",
label: "block text-small font-medium text-foreground-500",
label: "block text-small font-medium text-foreground-500 pointer-events-none",
trigger:
"relative px-3 gap-3 w-full inline-flex flex-row items-center shadow-sm outline-none tap-highlight-transparent",
innerWrapper:
Expand Down Expand Up @@ -138,14 +138,13 @@ const select = tv({
},
isLabelPlaceholder: {
true: {
label: "absolute z-10 pointer-events-none",
label: "absolute z-10",
},
},
isDisabled: {
true: {
base: "opacity-disabled pointer-events-none",
trigger: "pointer-events-none",
label: "pointer-events-none",
},
},
isInvalid: {
Expand Down

2 comments on commit cc839cd

@vercel
Copy link

@vercel vercel bot commented on cc839cd Aug 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vercel
Copy link

@vercel vercel bot commented on cc839cd Aug 21, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.