File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 43
43
let withOpenDialog = false ;
44
44
45
45
function handlePanelMount(event : CustomEvent <SMUIAccordionPanelAccessor >) {
46
+ // To make nested accordions work, ensure event sender is a direct child of this accordion
47
+ if (event .target .parentNode != element ) return ;
48
+
46
49
const accessor = event .detail ;
47
50
48
51
event .stopPropagation ();
61
64
}
62
65
63
66
function handlePanelUnmount(event : CustomEvent <SMUIAccordionPanelAccessor >) {
67
+ // To make nested accordions work, ensure event sender is a direct child of this accordion
68
+ if (event .target .parentNode != element ) return ;
69
+
64
70
const accessor = event .detail ;
65
71
66
72
event .stopPropagation ();
71
77
function handlePanelActivate(
72
78
event : CustomEvent <{ accessor: SMUIAccordionPanelAccessor }>
73
79
) {
80
+ // To make nested accordions work, ensure event sender is a direct child of this accordion
81
+ if (event .target .parentNode != element ) return ;
82
+
74
83
const { accessor } = event .detail ;
75
84
76
85
if (! multiple && ! accessor .open ) {
89
98
function handlePanelOpening(
90
99
event : CustomEvent <{ accessor: SMUIAccordionPanelAccessor }>
91
100
) {
101
+ // To make nested accordions work, ensure event sender is a direct child of this accordion
102
+ if (event .target .parentNode != element ) return ;
103
+
92
104
const { accessor } = event .detail ;
93
105
94
106
if (! multiple ) {
You can’t perform that action at this time.
0 commit comments