-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
docs(components): accordion controlled example shows errors #2339
docs(components): accordion controlled example shows errors #2339
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
@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! 👍 |
@@ -1,7 +1,7 @@ | |||
const App = `import {Accordion, AccordionItem} from "@nextui-org/react"; | |||
|
|||
export default function App() { | |||
const [selectedKeys, setSelectedKeys] = React.useState(new Set(["1"])); | |||
const [selectedKeys, setSelectedKeys] = React.useState<Selection>(new Set(["1"])); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const [selectedKeys, setSelectedKeys] = React.useState<Selection>(new Set(["1"])); | |
const [selectedKeys, setSelectedKeys] = React.useState(new Set(["1"])); |
As this file is meant to be used as plain "Javascript" file we cannot add typescript code
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
🚀 New behavior
No error.
💣 Is this a breaking change (Yes/No):
No.
📝 Additional Information