nextui
nextui copied to clipboard
docs(components): accordion controlled example shows errors
Closes #2337
📝 Description
After you copy and paste the code from controlled accordion example, you will an error on the onSelectionChange
function.
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.
💣 Is this a breaking change (Yes/No):
No.
📝 Additional Information
⚠️ 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
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 |
@kuri-sun is attempting to deploy a commit to the NextUI Team on Vercel.
A member of the Team first needs to authorize it.
@jrgarciadev Thanks for the review! The change is applied! 👍