Skip to content

fix: isReadOnly in Autocomplete#2429

Merged
jrgarciadev merged 5 commits into
heroui-inc:mainfrom
wingkwong:fix/eng-429
Mar 5, 2024
Merged

fix: isReadOnly in Autocomplete#2429
jrgarciadev merged 5 commits into
heroui-inc:mainfrom
wingkwong:fix/eng-429

Conversation

@wingkwong
Copy link
Copy Markdown
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
@changeset-bot
Copy link
Copy Markdown

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

@vercel
Copy link
Copy Markdown

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

@vercel
Copy link
Copy Markdown

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
Copy Markdown
Member

@wingkwong please remove the clear "X" button

CleanShot 2024-03-05 at 09 55 17

@wingkwong
Copy link
Copy Markdown
Member Author

@jrgarciadev just added.

image

@jrgarciadev
Copy link
Copy Markdown
Member

@jrgarciadev just added.

image

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

@wingkwong
Copy link
Copy Markdown
Member Author

@jrgarciadev sorry for misunderstanding. updated.

Copy link
Copy Markdown
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

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.

2 participants