1
0
Fork 0
mirror of synced 2024-09-11 23:16:00 +12:00

Close picker on click of listbox

This commit is contained in:
Mel O'Hagan 2022-05-10 13:16:21 +01:00
parent 974cdad8da
commit 516d163ea2

View file

@ -43,7 +43,7 @@
return
}
searchTerm = null
open = true
open = !open
}
const getSortedOptions = (options, getLabel, sort) => {
@ -71,6 +71,7 @@
}
</script>
<div use:clickOutside={() => (open = false)}>
<button
{id}
class="spectrum-Picker spectrum-Picker--sizeM"
@ -114,7 +115,6 @@
</button>
{#if open}
<div
use:clickOutside={() => (open = false)}
transition:fly|local={{ y: -20, duration: 200 }}
class="spectrum-Popover spectrum-Popover--bottom spectrum-Picker-popover is-open"
class:auto-width={autoWidth}
@ -183,6 +183,7 @@
</ul>
</div>
{/if}
</div>
<style>
.spectrum-Popover {