Skip to content

fix: keep popover open after clearing input in autocomplete#2148

Closed
abdulbasithqb wants to merge 2 commits into
heroui-inc:mainfrom
qburst:fixes/auto-complete-clear-button
Closed

fix: keep popover open after clearing input in autocomplete#2148
abdulbasithqb wants to merge 2 commits into
heroui-inc:mainfrom
qburst:fixes/auto-complete-clear-button

Conversation

@abdulbasithqb
Copy link
Copy Markdown

Closes #2146

📝 Description

Add a brief description

⛳️ Current behavior (updates)

The current behavior of the onClear function is to clear the input value and selected item, but the popover closes afterward, and there is an issue with the focus not behaving as expected.

Please describe the current behavior that you are modifying

🚀 New behavior

With this PR, the onClear function has been fixed by adding state.setOpen(true);, ensuring that the popover remains open after clearing the input, and the input field regains focus correctly.

Please describe the behavior or changes this PR adds

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

No

📝 Additional Information

  • The bug is fixed in use-autocomplete.ts
  • This fix is intended to improve user experience by addressing the issue of the popover closing unexpectedly after clearing the input, and ensuring the input field regains focus as expected.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Dec 19, 2023

⚠️ No Changeset found

Latest commit: 2cbc5b1

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 19, 2023

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

A member of the Team first needs to authorize it.

@vercel
Copy link
Copy Markdown

vercel Bot commented Dec 19, 2023

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 Dec 19, 2023 8:22am

@abdulbasithqb
Copy link
Copy Markdown
Author

Hey @jrgarciadev could you please review this PR ?

@ewertonce
Copy link
Copy Markdown

hi guys @abdulbasithqb @jrgarciadev how are you, I hope you are all well. Do you have any predictions about whether this will be merged please? thanks in advance o/

@wingkwong
Copy link
Copy Markdown
Member

Closing - No longer reproducible in 2.3.5.

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 does not work when the clear button is hit.

3 participants