B-3PO / angular-material-expansion-panel

Material Design Expansion Panels for Angular Material
MIT License
71 stars 25 forks source link

Collapse an expanded panel by clicking on the header #47

Closed chenlijun99 closed 6 years ago

chenlijun99 commented 6 years ago

It would be handy that a panel that is expanded can be collapsed by clicking on its header. It could be achieved with <md-expansion-panel-header ng-click="$panel.collapse()"> and proper CSS, but having it built-in would be nice.

Something like this https://material.angular.io/components/expansion/overview

coopernewby commented 6 years ago

You can also just add<md-expansion-panel-expanded ng-click="$panel.collapse()"> to the expanded panel

chenlijun99 commented 6 years ago

Yeah, but it would nice to have into built-in, so that we can avoid to write that each time.

Anyway in a commit of mine I've added this feature.

It would be aweosome, if you have time to review my pull-request