Close on select and wrap selection

This commit is contained in:
Conor_Mack 2020-07-02 11:22:30 +01:00
parent 5f4747aa25
commit 6ad280a423
1 changed files with 3 additions and 1 deletions

View File

@ -80,6 +80,7 @@
function handleClick(val) { function handleClick(val) {
value = val value = val
onChange(value) onChange(value)
toggleSelect(false)
} }
$: menuStyle = buildStyle({ $: menuStyle = buildStyle({
@ -108,7 +109,7 @@
bind:this={select} bind:this={select}
class="bb-select-container" class="bb-select-container"
on:click={() => toggleSelect(!open)}> on:click={() => toggleSelect(!open)}>
<div bind:this={selectAnchor} class="bb-select-anchor selected"> <div bind:this={selectAnchor} title={value} class="bb-select-anchor selected">
<span>{displayLabel}</span> <span>{displayLabel}</span>
<i bind:this={icon} class="ri-arrow-down-s-fill" /> <i bind:this={icon} class="ri-arrow-down-s-fill" />
</div> </div>
@ -174,6 +175,7 @@
background-color: var(--grey-2); background-color: var(--grey-2);
border-radius: 5px; border-radius: 5px;
align-items: center; align-items: center;
white-space: nowrap;
} }
.bb-select-anchor > span { .bb-select-anchor > span {