Collapse Show by Default


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.
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

Thank you for noticing, we will think about fixing this in the future.
I achieved it using below way:  
@ViewChildren(CollapseDirective) allCollapses: CollapseDirective[];
...
ngAfterViewInit() {
this.allCollapses.forEach(collapse =>collapse.show());
}

mr.Jelle-Beat commented 6 years ago

Can you show us the HTML used?

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 5 years ago

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


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
  • User: Pro
  • Premium support: No
  • Technology: MDB Angular
  • MDB Version: -
  • Device: -
  • Browser: -
  • OS: -
  • Provided sample code: No
  • Provided link: No