Topic: Collapse Show by Default

brownsvillepub pro asked 7 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 6 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 6 years ago


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

mr.Jelle-Beat free commented 6 years ago

Can you show us the HTML used?

Edyta Dabrowska free answered 7 years ago


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

Edyta Dabrowska free answered 7 years ago


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

brownsvillepub pro commented 7 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.

FREE CONSULTATION

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

Status

Resolved

Specification of the issue

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