Topic: Collapse Show by Default

brownsvillepub pro asked 6 years ago

Is there a way to show the collapse to expanded by default? i was able to do collapse="false" and it shows it, however the transition to hide does not work. Any help would be appreciated.

Arkadiusz Idzikowski staff answered 5 years ago

In new version 6.2.3 (which will be published on September 10) there will be input [isCollapsed] which will allow you to define collapsed state as true/false. Regards, Arek

peterhaiti19 pro commented 4 years ago

I have the same problem now... It is available please ?

Dharmen Milestone free answered 5 years ago

I achieved it using below way:  
@ViewChildren(CollapseDirective) allCollapses: CollapseDirective[];
ngAfterViewInit() {
this.allCollapses.forEach(collapse =>;

mr.Jelle-Beat free commented 5 years ago

Can you show us the HTML used?

Edyta Dabrowska free answered 6 years ago

Thank you for noticing, we will think about fixing this in the future.

Edyta Dabrowska free answered 6 years ago

Hi, please try adding [collapse]="true" to the collapsed div.

brownsvillepub pro commented 6 years ago

When I do that, the transition does not work on the initial time. it just closes the div not with a transitional hide

Please insert min. 20 characters.


Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.



Specification of the issue

  • ForumUser: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No