[AccordionItem] extend to render contents when expanded/opened
#5901 aperta il 21 apr 2020
Metriche repository
- Star
- (7442 stelle)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Summary
I'd like to offer up a contribution that we made recently in https://github.com/IBM/carbon-addons-iot-react/pull/1105 , if the team is interested.
We've extended AccordionItem to include optional stateful logic to only render the contents on expand of the section.
Justification
Some consuming applications with a ton of content (think entire dashboards) see a perf hit when contents is always rendered irrespective of if the AccordionItem is closed.
Desired UX and success metrics
via a prop or composition, the accordion item can be configured to render content when expanded. Closing of the section should not unmount the contents, but preserve it.
Specific timeline issues / requests
n/a
Available extra resources
I can submit a PR if y'all are good with this idea 👍