Fix adding a label twice when selecting it and pressing enter

This commit is contained in:
kolaente 2021-01-10 21:56:35 +01:00
parent d89a855ca7
commit 3e71b76c25
No known key found for this signature in database
GPG key ID: F40E70337AB24C9B

View file

@ -40,7 +40,7 @@
@keydown.up.prevent="() => preSelect(-2)"
@keydown.down.prevent="() => preSelect(0)"
@keyup.enter.prevent="create"
@click="create"
@click.prevent.stop="create"
>
<span>
<slot name="searchResult" :option="query">
@ -59,8 +59,7 @@
:ref="`result-${key}`"
@keydown.up.prevent="() => preSelect(key - 1)"
@keydown.down.prevent="() => preSelect(key + 1)"
@keyup.enter.prevent="() => select(data)"
@click="() => select(data)"
@click.prevent.stop="() => select(data)"
>
<span>
<slot name="searchResult" :option="data">