md-expansion-panel with a button
See original GitHub issueBug, feature request, or proposal:
More a request than a bug I suppose
What is the expected behavior?
When having a button in <md-expansion-panel-header>
the button should trigger normaly without collapsing the panel.
What is the current behavior?
Clicking the button collapses the panel
What are the steps to reproduce?
http://plnkr.co/edit/QFkAL500pcgqxLgL9BnF?p=preview
What is the use-case or motivation for changing an existing behavior?
I believe it should behave a little bit like a toolbar (+ the expansion part), it would be great.
A class should maybe exist to prevent this behavior in the <md-expansion-panel-header>
tag
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
Is there anything else we should know?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:5
- Comments:22 (5 by maintainers)
Top Results From Across the Web
Expansion Panel - KivyMD's documentation - Read the Docs
To use MDExpansionPanel you must pass one of the following classes to the panel_cls parameter: MDExpansionPanelOneLine. MDExpansionPanelTwoLine.
Read more >Create an expansion panel in / on a new screen using kivymd ...
In summary, I want to be able to create something like in the 2nd code but in the settings screen of my main...
Read more >Expansion Panel - Google Groups
from kivymd.uix.expansionpanel import MDExpansionPanel, ... I couldn't, so I added a button and incredibly it wasn't centered either.
Read more >Learn to Make Beautiful Mobile Apps in Python | KivyMD Tutorial
In today's video I cover a widget that you see in many apps that follow Material Design standards: the MDExpansionPanel.
Read more >Module @react-md/expansion-panel
The expansion panel renders a header element (that is just a button) and dynamically shows content once expanded. Const ExpansionPanelHeader.
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
Hi guys, I solved similar issue by adding
(click)="foo($event)"
to the check-box element, then in the Component I doThat is what I am trying to do:
Basically I have a filters thing, so I want to show the basic filter by default and then if user want to apply more filters the panel has to be expanded by clicking the expand button.
Now if user clicked any controls on in the header it trigger the panel to expand. It would of be nice to be able to have an option that you can expand panel only by clicking the dedicated expand button in the right corner.
However by reading the responses on that issue seams like it is against the
Expansion Panel Google material style guide
however it is something in my spec that I have to implement and seems likemat-expansion-panel
is the best thing to address that.@julianobrasil Tried to set
[disabled]="false"
but now it prevents the panel to be expanded.What do you think is the best way of handle that?
UPDATE: I kind of work it out by playing with
disabled
attribute say like putting a button in themat-panel-description
that call theexpandPannel()
Also you need this css to hide the default arrow:
But it is kind of hacky I would say. It would of be much nicer if Expansion Panel could handle such case.
UPDATE: working example based on the code above https://stackblitz.com/edit/angular-3jcuzp