Skip to content

Commit f20cf93

Browse files
committed
fix
1 parent 56d1942 commit f20cf93

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib/components/Accordion.svelte

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,12 @@
2929
}
3030
}
3131
32+
// Sync input with prop and animate when prop changes
33+
$: if (inputEl && contentEl && inputEl.checked !== checked) {
34+
inputEl.checked = checked;
35+
toggleContent();
36+
}
37+
3238
function onTransitionEnd() {
3339
if (!inputEl.checked) {
3440
contentEl.style.display = 'none';

0 commit comments

Comments
 (0)