mirror of
https://github.com/shoelace-style/shoelace.git
synced 2026-01-12 11:09:13 +00:00
fix details example
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user