Fix multiselect crashing in certain circumstances
This commit is contained in:
parent
27d41069cb
commit
2fa42d194b
|
@ -61,6 +61,9 @@
|
|||
|
||||
function handleOptionMousedown(e) {
|
||||
const value = e.target.dataset.value
|
||||
if (value == null) {
|
||||
return
|
||||
}
|
||||
if (selected[value]) {
|
||||
remove(value)
|
||||
} else {
|
||||
|
@ -118,7 +121,7 @@
|
|||
</li>
|
||||
{/each}
|
||||
{#if !options.length}
|
||||
<li>No results</li>
|
||||
<li class="no-results">No results</li>
|
||||
{/if}
|
||||
</ul>
|
||||
{/if}
|
||||
|
@ -264,6 +267,10 @@
|
|||
li:not(.selected):hover {
|
||||
background-color: var(--grey-1);
|
||||
}
|
||||
li.no-results:hover {
|
||||
background-color: white;
|
||||
cursor: initial;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
|
|
Loading…
Reference in New Issue