-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Accordion inside accordion not working properly V10 #4768
Comments
Hi 👋 thank you for reporting! Nested accordion is not supported, though - More discussion can be found at #2230. |
@asudoh @joshblack can we reopen this issue to provide this functionality. Our dev thinks it would be a pretty trivial style change to be able to support this capability. If either of the options below are acceptable we would be willing to open up a PR. Please advise. Comment from issue #855 of our addons repo:
|
@carbon-design-system/design Any thoughts on how the best design would be for above use case? Thanks! |
@asudoh This is from the slack discussion. I spoke with @joshblack and @aagonzales and we're aligned on the design recommendation to find ways to avoid a nested accordion.
|
Thanks @designertyler! Closing for now given the discussion, but can re-open once if any other possible valid use-cases come up. |
Hi @asudoh, one use case is on our faq page: Where each faq topic is nested under a collection:
|
The position is that generally, nested accordions should be avoided. That doesn't mean there might not be a use case where a team might "need" it. However, the accordion component in the Core/Common package is not going to be expanded to accommodate this feature. There's many reasons why we do not want to encourage this pattern, across the business, by incorporating it into this component, meant to be used by everyone at IBM, everywhere. @davidicus > Our dev thinks it would be a pretty trivial style change to be able to support this capability. If either of the options below are acceptable we would be willing to open up a PR. In this case, your team is able to create your own "nested accordion" component, extending or modifying the Core/Common one, to satisfy the use case for your business. You are also able to have it included in the component index, if you think the applications or use cases extend beyond your business' needs. |
Environment
Mac os Catalina 10.15.1
Chrome 78.0.3904.97
carbon-components 10.7.4
carbon-components-react 7.7.4
Description
Upon expanding the parent accordion the child accordions open in expanded form and click on their header does not work.
Steps to reproduce the issue
Note: The same code works fine for version 9.57.0 of carbon-components and 6.115.1 of carbon-components-react.
Sandbox
https://codesandbox.io/s/polished-wildflower-y3yps
Change dependencies version to 9.57.0 for carbon-components and 6.115.1 for carbon-components-react and change the CSS link version to 9.57.0 to see the desired working model.
EDIT: Modified CSS in the sandbox to achieve the desired result but it would be better if it ships out of the box with the same. Especially since it was already supported in the previous version.
The text was updated successfully, but these errors were encountered: