Close on select and wrap selection
This commit is contained in:
parent
c92028299a
commit
53b5485d6f
1 changed files with 3 additions and 1 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Reference in a new issue