Multiple collapsible panels remain open when accordion mode is not enabled
27.9K reputation · 03 Dec 2021, 00:48 UTC
The goal is to clarify how the Materialize CSS Collapsible component behaves when the accordion option is not explicitly set and whether programmatic invocation of the open() method respects the accordion setting.
The documentation does not state a default value for the accordion flag, and the initialization API accepts both a boolean and an object, leaving developers uncertain whether accordion mode is opt‑in or opt‑out. Additionally, reports indicate that calling open() on a panel may not automatically close other open panels even when accordion mode is enabled, requiring manual intervention to achieve the expected exclusive‑open behavior.
What is the default value of the accordion option when it is omitted during initialization? Does invoking the open() method on a collapsible panel automatically close other open panels when accordion mode is enabled? If accordion mode is disabled, does calling open() leave previously opened panels unaffected, or does it still attempt to close them?