nextui icon indicating copy to clipboard operation
nextui copied to clipboard

docs(components): accordion controlled example shows errors

Open kuri-sun opened this issue 1 year ago • 4 comments

Closes #2337

📝 Description

After you copy and paste the code from controlled accordion example, you will an error on the onSelectionChange function. old Because we are missing the type for the useState.

⛳️ Current behavior (updates)

Throwing the following error

Type 'Dispatch<SetStateAction<Set<string>>>' is not assignable to type '(keys: Selection) => any'.
  Types of parameters 'value' and 'keys' are incompatible.
    Type 'Selection' is not assignable to type 'SetStateAction<Set<string>>'.
      Type 'string' is not assignable to type 'SetStateAction<Set<string>>'.ts(2322)

🚀 New behavior

No error. new

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

No.

📝 Additional Information

kuri-sun avatar Feb 11 '24 21:02 kuri-sun

⚠️ No Changeset found

Latest commit: 41fe028ea1398c50dda48654169c640a5d427e64

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

changeset-bot[bot] avatar Feb 11 '24 21:02 changeset-bot[bot]

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 9:30pm

vercel[bot] avatar Feb 11 '24 21:02 vercel[bot]

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

A member of the Team first needs to authorize it.

vercel[bot] avatar Feb 11 '24 21:02 vercel[bot]

@jrgarciadev Thanks for the review! The change is applied! 👍

kuri-sun avatar Feb 13 '24 02:02 kuri-sun