infor-design / enterprise-wc

Enterprise-grade web component library for the Infor Design System
Apache License 2.0
27 stars 22 forks source link

IdsAccordion: All child panels should collapse when Parent parent is collapsed #2407

Open ShwetaKhera opened 1 month ago

ShwetaKhera commented 1 month ago

Describe the bug When parent panel is collapsed, child accordion panels do not collapse

To Reproduce

Steps to reproduce the behavior:

  1. Open https://main.wc.design.infor.com/ids-accordion/nested.html
  2. Open all sub levels of accordion
  3. Close Level 1 and reopen
  4. Notice all child accordions are open

Expected behavior On parent accordion close, all its child accordions should also close

Version

Screenshots

https://github.com/infor-design/enterprise-wc/assets/30701871/8533c8e1-2bc7-4713-ae59-2056fd278e1b

Platform

Additional context Add any other context about the problem here.

tmcconechy commented 4 weeks ago

@ShwetaKhera we think that its better to preserve the state for the child items and keep them as is. Is there a specific reason for needing this behavior? We could use a setting?

ShwetaKhera commented 1 week ago

@tmcconechy For our use-case, we are opening accordions in a drawer. So we want to be able to close accordions when we close the drawer (without having to loop through them and close each one manually).

tmcconechy commented 1 week ago

OK, we just didnt think it makes sense because now they have to go and reopen them all. Our previous module nav and app menus menus dont seem to behave that way.