Commit c459364 1 parent c539d3f commit c459364 Copy full SHA for c459364
File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change 7
7
property ,
8
8
TemplateResult ,
9
9
} from "lit-element" ;
10
+ import { fireEvent } from "../common/dom/fire_event" ;
10
11
11
12
@customElement ( "ha-expansion-panel" )
12
13
class HaExpansionPanel extends LitElement {
@@ -39,6 +40,7 @@ class HaExpansionPanel extends LitElement {
39
40
40
41
private _togglePanel ( ) : void {
41
42
this . expanded = ! this . expanded ;
43
+ fireEvent ( this , this . expanded ? "expanded" : "collapsed" ) ;
42
44
}
43
45
44
46
static get styles ( ) : CSSResult {
@@ -132,4 +134,10 @@ declare global {
132
134
interface HTMLElementTagNameMap {
133
135
"ha-expansion-panel" : HaExpansionPanel ;
134
136
}
137
+
138
+ // for fire event
139
+ interface HASSDomEvents {
140
+ expanded : undefined ;
141
+ collapsed : undefined ;
142
+ }
135
143
}
You can’t perform that action at this time.
0 commit comments