Accordion in Angular adding collapse inside item
See original GitHub issueAdding a collapse inside accordion to show or hide a certain fields / controls and adjust the height. In order to achieve this, I added a button that will trigger the collapse and a css
:host ::ng-deep .accordion-item:last-of-type { .accordion-collapse { height: auto !important; } }
The collapse works with height set to auto, but when I click the toggle in accordion, all the controls disappear and it will not close.
- Operating system and version (Windows 11)
- Browser and version (Microsoft Edge)
Issue Analytics
- State:
- Created 10 months ago
- Comments:18 (10 by maintainers)
Top Results From Across the Web
How to Expand or collapse accordion items on checkbox click ...
By default, accordion items expand or collapse by clicking the accordion item header or clicking expand/collapse icon in accordion header.
Read more >Angular Bootstrap Accordion - examples & tutorial
The accordion uses collapse internally to make it collapsible. To render an accordion that's expanded, use [collapsed]="false" on accordion item. Basic example.
Read more >Handle open/collapse events of Accordion in Angular
Here's a solution inspired by kjv's answer, which easily tracks which accordion element is open. I found difficult getting ...
Read more >A simple but customizable accordion component in Angular
An input collapsing is taken from the user which defines the behavior of the accordion. It tells the accordion whether to close other...
Read more >Expansion Panel | Angular Material
The <mat-expansion-panel-header> shows a summary of the panel content and acts as the control for expanding and collapsing. This header may optionally ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
It works now. I updated to the latest version. Thanks a lot for helping.
That’s right
see: https://stackblitz.com/edit/angular-ivy-yjkctj?file=src%2Fapp%2Fapp.component.scss,src%2Fapp%2Fapp.module.ts working example: https://stackblitz.com/edit/angular-ivy-yjkctj