File tree 3 files changed +6
-4
lines changed
3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 10
10
on:SMUIAccordionPanel:mount ={handlePanelMount }
11
11
on:SMUIAccordionPanel:unmount ={handlePanelUnmount }
12
12
on:SMUIAccordionPanel:activate ={handlePanelActivate }
13
- on:SMUIAccordionPanel:opened ={ handlePanelOpened }
13
+ on:SMUIAccordionPanel:opening ={ handlePanelOpening }
14
14
{...$$restProps }
15
15
>
16
16
<slot />
82
82
accessor .setOpen (! accessor .open );
83
83
}
84
84
85
- function handlePanelOpened (
85
+ function handlePanelOpening (
86
86
event : CustomEvent <{ accessor: SMUIAccordionPanelAccessor }>
87
87
) {
88
88
const { accessor } = event .detail ;
Original file line number Diff line number Diff line change 84
84
if (content ) {
85
85
content .style .height = ' ' ;
86
86
}
87
+ dispatch (getElement (), ' SMUIAccordionPanel:opened' , { accessor });
87
88
},
88
89
{ once: true }
89
90
);
95
96
if (content ) {
96
97
content .style .height = ' ' ;
97
98
}
99
+ dispatch (getElement (), ' SMUIAccordionPanel:closed' , { accessor });
98
100
});
99
101
}
100
102
105
107
106
108
dispatch (
107
109
getElement (),
108
- open ? ' SMUIAccordionPanel:opened ' : ' SMUIAccordionPanel:closed ' ,
110
+ open ? ' SMUIAccordionPanel:opening ' : ' SMUIAccordionPanel:closing ' ,
109
111
{ accessor }
110
112
);
111
113
}
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ declare namespace svelte.JSX {
12
12
[ 'onSMUIAccordionPanel:activate' ] ?: (
13
13
event : CustomEvent < any > & { target : T }
14
14
) => any ;
15
- [ 'onSMUIAccordionPanel:opened ' ] ?: (
15
+ [ 'onSMUIAccordionPanel:opening ' ] ?: (
16
16
event : CustomEvent < any > & { target : T }
17
17
) => any ;
18
18
}
You can’t perform that action at this time.
0 commit comments