#close the nextui accordion not by clicking it

12 messages ยท Page 1 of 1 (latest)

raven walrus
#

but with a state variable, is it possible?

sacred roseBOT
#

๐Ÿ”Ž This post has been indexed in our web forum and will be seen by search engines so other users can find it outside Discord

๐Ÿ•ต๏ธ Your user profile is private by default and won't be visible to users outside Discord, if you want to be visible in the web forum you can add the "Public Profile" role in id:customize

โœ… You can mark a message as the answer for your post with Right click -> Apps -> Mark Solution
(if you don't see the option, try refreshing Discord with Ctrl + R)

marble tide
#

Sure its possible. you using shadcn?

raven walrus
#

oh it needs to be controlled

marble tide
#

yep

raven walrus
#

okay fixed lolsob

marble tide
#

Lol NJ. Make sure to close your post please ๐Ÿ™‚

raven walrus
#

everytime i ask on discord, i inmediately solve the problem

marble tide
#

No worries man. If you can provide the example of how you fixed it and mark it as the answer. Just so if anyone else has this problem they can find it archived!

raven walrus
#

cool, give me some minutes

marble tide
#

np!

raven walrus
#

if you set this to an empty array you can close it, but it needs to be controlled

  const [expandedKeys, setExpandedKeys] = useState<Set<Key>>(new Set<Key>(['item1']));```