Skip to content

Commit

Permalink
Fix space and escape in multiselect search #1983
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico Hoffmann committed Aug 8, 2019
1 parent 0d7831b commit 48c850a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions panel/src/components/Forms/Input/MultiselectInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,17 @@
slot="footer"
ref="dropdown"
@open="onOpen"
@close="q = null"
>
<k-dropdown-item
v-if="search"
icon="search"
class="k-multiselect-search"
>
<input ref="search" v-model="q">
<input
ref="search"
v-model="q"
@keydown.esc.stop="escape"
/>
</k-dropdown-item>

<div class="k-multiselect-options">
Expand Down Expand Up @@ -156,12 +159,10 @@ export default {
this.onInvalid();
this.$events.$on("click", this.close);
this.$events.$on("keydown.cmd.s", this.close);
this.$events.$on("keydown.esc", this.escape);
},
destroyed() {
this.$events.$off("click", this.close);
this.$events.$off("keydown.cmd.s", this.close);
this.$events.$off("keydown.esc", this.escape);
},
methods: {
add(option) {
Expand Down

0 comments on commit 48c850a

Please sign in to comment.