Skip to content
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

Feature: Control Accordion State #1177

Open
jflook10 opened this issue Mar 22, 2022 · 0 comments
Open

Feature: Control Accordion State #1177

jflook10 opened this issue Mar 22, 2022 · 0 comments
Labels
4.0.0 enhancement New feature or request

Comments

@jflook10
Copy link
Collaborator

jflook10 commented Mar 22, 2022

Is your feature request related to a problem? Please describe.
AAccordion has initial collapsed prop to control the initial collapse state but additional collapse state handling is needed after the initial render.

Describe the solution you'd like
Another prop is needed to control the collapsed state based on outside parent/sibling events.

Describe alternatives you've considered

This is using the key prop in React to "remount" the component in a way that resets its state. For the Accordion, if you have collapsed for the accordions as some type of state in the page you're rendering the accordions, then you can get the effect of controlling the state by using the combination of key and collapsed. It's a bit far fetched, and I don't think this is how the state should be controlled, but if you needed something asap, then you might find a way to use the key prop

Additional context
Spoke with Brennan on 3/11. This is a nice to have for the production version of iroh-registration-ui

@brennarvo brennarvo added 4.0.0 enhancement New feature or request labels Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.0.0 enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants