fix details example

This commit is contained in:
Cory LaViska
2023-10-19 09:39:13 -04:00
parent b1b54a5a34
commit eb96e3db4b

View File

@@ -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>