kopia lustrzana https://github.com/shoelace-style/shoelace
fix details example
rodzic
b1b54a5a34
commit
eb96e3db4b
|
@ -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>
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue