-
-
Notifications
You must be signed in to change notification settings - Fork 447
<Accordion.Panel isOpen={true}> doesn't work also setOpen and isOpen doesn't work with props #735
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
Comments
Sorry, I don't get the problem. Can you give more details? You can get the source code to the examples here: https://github.com/themesberg/flowbite-react/blob/main/src/docs/pages/AccordionPage.tsx PS: If you cold add a video demonstrating the problem, it would be better to understand, or to provide a sample project. |
I have a form for the user's profile in each accordion panel, and I want the user to see a SAVE button at the end of each accordion panel and open the next accordion panel after clicking the button. It means that I can control which accordion panel is open with a state and manage its opening and closing. |
please read this : https://github.com/themesberg/flowbite-react/tree/main/src/lib/components/Accordion |
I still don't get it. Can you provide an example project? |
I'm also having this problem myself. In a very simple use case:
Does not seem to open or close the accordion panel accordingly. The isOpen state is being changed, but the state is not being reflected by the accordionPanel. |
To note here is that I've also attempted using the setOpen prop for AccordionPanel, which imo is lacking documentation on how it's supposed to be used. As someone trying to use AccordionPanel, the setOpen prop is lacking description on how it's supposed to be used, and what it's for. |
@realvandi documentation update should be coming soon. The library wasn't released yet, so, it is expected to have missing documentation, but the code is always your best friend in this case. |
@rluders thanks for the quick response, it's very much appreciated. In the meanwhile, any hints on what could be done in order to trigger the opening/closing of the AccordionPanel? I can't seem to figure out what's wrong, even after reading through the code. Any answer would be much appreciated, thanks again for responding |
@IuriPires can you help on this one? I'm not sure when I'll have time to test it right now. |
Sure!! |
Could someone confirm if the issue still exists? |
Stumbled upon this thread since I ran into the same problem. I believe this is still an issue. My use case calls for the accordion panels to default open.
Here, only the "One" accordion panel is open when both should be open. I am using the latest npm version |
I believe the setOpen callback may also not fire as well. (I assume this is meant to fire when the panel opens?) |
Is this working? I'm trying the isOpen prop and it's not responding. Please help <Accordion>
<Accordion.Panel itemID="panel1" >
<Accordion.Title>Panel 1</Accordion.Title>
<Accordion.Content>
panel 1 content
</Accordion.Content>
</Accordion.Panel>
<Accordion.Panel itemID="panel2" isOpen={true}>
<Accordion.Title>Panel 2</Accordion.Title>
<Accordion.Content>
panel 2 content
</Accordion.Content>
</Accordion.Panel>
</Accordion> |
anyone managed to make it work? |
I'm also having the issue. any one got a fix? |
Same issue here |
same issue here, trying to use isOpen to make all panels open by default but it is not working |
In my Case I was tried to use accordion with map iterator but it does not work properly. I hope this usage can help someone.
And this is arrow icon component above.
|
This is still an issue, have not found a workaround |
I'm running into this as well, version 0.11.1 here. Do we know if #1404 fixes the issue, assuming it hasn't bitrotted? Odd that it hasn't even been commented on. |
Unfortunately we'll have to rewrite the component from scratch, entirely, the current state its... yeah, not much to say. |
Describe the bug
In the project, I need to manage the accordions panel and be able to open and close them, but I can't, I also checked the Flowbite codes and realized that they are not written correctly.
Expected behavior
I want to manage isOpen and setOpen from the accordion panel and they work correctly.
Screenshots

System information:
Project information:
The text was updated successfully, but these errors were encountered: