GotJimmy / accordion

Other
46 stars 43 forks source link

setState issue in accordion #36

Closed RushikeshB97 closed 1 year ago

RushikeshB97 commented 1 year ago

Hello,

Thanks for this amazing package.

I have accordion, inside accordion there I have 2 sections. Each section has one dropdown, when user selects dropdown value, I need to set the same value for other accordion dropdown.

Now when I try to do setState after selecting value, accordion closes on its own.

Is there a way, I can use setstate without affecting accordion state?

Thanks!

GotJimmy commented 1 year ago

The dropdown of yours is in the content section of AccordionSection, not in the header, right? What have you set for maxOpenSections in Accordion?

RushikeshB97 commented 1 year ago

Hello,

Thanks for reply.

Yes, dropdown is in content section.

Hierarchy is like this : content -> column -> accordion -> accordion sections.

I managed to solve it at most extent by adding following flags:

maxOpenSections: 10, openAndCloseAnimation: false, scaleWhenAnimating: false

Feel free to close this thread.

Thanks!

GotJimmy commented 1 year ago

Glad it worked out for you!