Skip to content

fix(components): isdisabled does not disable dropdown#2435

Merged
jrgarciadev merged 1 commit into
heroui-inc:mainfrom
kuri-sun:fix/components/isdisabled-does-not-disable-dropdown
Mar 3, 2024
Merged

fix(components): isdisabled does not disable dropdown#2435
jrgarciadev merged 1 commit into
heroui-inc:mainfrom
kuri-sun:fix/components/isdisabled-does-not-disable-dropdown

Conversation

@kuri-sun
Copy link
Copy Markdown

@kuri-sun kuri-sun commented Mar 3, 2024

Closes #2276

📝 Description

Based on the docs, adding an isDisabled prop and setting it to true does not disable a dropdown

⛳️ Current behavior (updates)

The isDisabled prop does not work, because the Dropdown component does not pass the isDisabled prop to the PopoverTrigger component.

🚀 New behavior

It disables the trigger when isDisabled prop gets passed.

Screen.Recording.2024-03-03.at.8.21.55.AM.mov

💣 Is this a breaking change (Yes/No):

No.

📝 Additional Information

N/A

@kuri-sun kuri-sun requested a review from jrgarciadev as a code owner March 3, 2024 00:02
@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 3, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nextui-storybook-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 3, 2024 0:05am

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 3, 2024

🦋 Changeset detected

Latest commit: 6db752b

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@nextui-org/dropdown Major
@nextui-org/react Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 3, 2024

@kuri-sun is attempting to deploy a commit to the NextUI Inc Team on Vercel.

A member of the Team first needs to authorize it.

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const {onKeyDown, onPress, onPressStart, ...otherMenuTriggerProps} = menuTriggerProps;

return {
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It is important here to use props.isDisabled so that the PopoverTrigger component can respect another isDisabled gets passed by the user. (Otherwise, the unit test is going to fail.)

@jrgarciadev jrgarciadev merged commit 9b27da5 into heroui-inc:main Mar 3, 2024
@kuri-sun kuri-sun deleted the fix/components/isdisabled-does-not-disable-dropdown branch March 3, 2024 21:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] - isDisabled does not disable dropdown

3 participants