fix details example

pull/1663/head^2
Cory LaViska 2023-10-19 09:39:13 -04:00
rodzic b1b54a5a34
commit eb96e3db4b
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -123,7 +123,9 @@ Details are designed to function independently, but you can simulate a group or
// Close all other details when one is shown
container.addEventListener('sl-show', event => {
[...container.querySelectorAll('sl-details')].map(details => (details.open = event.target === details));
if (event.target.localName === 'sl-details') {
[...container.querySelectorAll('sl-details')].map(details => (details.open = event.target === details));
}
});
</script>