Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: isReadOnly in Autocomplete #2429

Merged
merged 5 commits into from
Mar 5, 2024
Merged

Conversation

wingkwong
Copy link
Member

@wingkwong wingkwong commented Mar 2, 2024

Closes #2420

📝 Description

  • revised the isReadOnly logic in Autocomplete
  • created isReadOnly example in storybook

⛳️ Current behavior (updates)

when isReadOnly is set, users

  • cannot edit the input
  • can open the listbox
  • can select the menu option

🚀 New behavior

when isReadOnly is set, users

  • cannot edit the input
  • can open the listbox
  • cannot select the menu option

image

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

No

📝 Additional Information

When someone prefer to not open the listbox, then they should use isDisabled instead.

@wingkwong wingkwong requested a review from jrgarciadev as a code owner March 2, 2024 10:17
Copy link

changeset-bot bot commented Mar 2, 2024

🦋 Changeset detected

Latest commit: 91ebc4a

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/autocomplete Patch
@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

Copy link

vercel bot commented Mar 2, 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 5, 2024 1:16pm

Copy link

vercel bot commented Mar 2, 2024

@wingkwong is attempting to deploy a commit to the NextUI Inc Team on Vercel.

A member of the Team first needs to authorize it.

@jrgarciadev
Copy link
Member

@wingkwong please remove the clear "X" button

CleanShot 2024-03-05 at 09 55 17

@wingkwong
Copy link
Member Author

@jrgarciadev just added.

image

@jrgarciadev
Copy link
Member

@jrgarciadev just added.

image

@wingkwong i mean if the isReadOnly is true we should no display the clear button

@wingkwong
Copy link
Member Author

@jrgarciadev sorry for misunderstanding. updated.

Copy link
Member

@jrgarciadev jrgarciadev left a comment

Choose a reason for hiding this comment

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

Thank you! @wingkwong

@jrgarciadev jrgarciadev merged commit bae544d into heroui-inc:main Mar 5, 2024
6 of 8 checks passed
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] - AutoComplete ListBox still opening while isReadOnly set to true
2 participants