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(use-autocomplete): overwrite onKeyDown to prevent meaningless error msg #2100

Merged
merged 1 commit into from
Apr 15, 2024

Conversation

black197
Copy link
Contributor

@black197 black197 commented Dec 6, 2023

📝 Description

Inside useAutocomplete, useComboBox().inputProps.onKeyDown causes following error message when user presses key:

stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior.

Since useComboBox is imported from third-party dependency and has nothing to do with NextUI users, we can hide the error message by overwriting inputProps.onKeyDown.

⛳️ Current behavior (updates)

When focus Autocomplete and press keys, error messages appear in the console.

🚀 New behavior

Can't see such error messages anymore.

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

📝 Additional Information

Copy link

changeset-bot bot commented Dec 6, 2023

🦋 Changeset detected

Latest commit: 729b714

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 Dec 6, 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 6, 2023 4:40am

Copy link

vercel bot commented Dec 6, 2023

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

A member of the Team first needs to authorize it.

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.

Thanks! @black197

@jrgarciadev jrgarciadev merged commit af877f7 into nextui-org:main Apr 15, 2024
2 of 3 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
3 participants