vue-search-select icon indicating copy to clipboard operation
vue-search-select copied to clipboard

Prevent select event when completing typing Japanese with Enter key

Open chanhlt opened this issue 5 years ago • 0 comments

When I am typing Japanese , I need to use Enter key to complete typing. However, when I do that vue-search-select fires the select event at the same time. This results I will always select the first matching item.

Can anyone tell me how to fix this?

Here my code.

<template>
  <model-select :options="options" v-model="item" placeholder="select item">
  </model-select>
</template>

<script>
import { ModelSelect } from "vue-search-select/src/lib";

export default {
  data() {
    return {
      options: [
        { value: "1", text: "土地 1" },
        { value: "2", text: "土地 2" },
        { value: "3", text: "土地 3" },
        { value: "4", text: "土地 4" },
        { value: "5", text: "土地 5" }
      ],
      item: {
        value: "",
        text: ""
      }
    };
  },
  components: {
    ModelSelect
  }
};
</script>

And picture:

I have the list.

Screen Shot 2019-12-11 at 9 59 26

Typing 土地

Screen Shot 2019-12-11 at 9 59 36

And press Enter . I expect the select event is not fired yet at this moment. However, it is. :((

Screen Shot 2019-12-11 at 9 59 42

chanhlt avatar Dec 11 '19 01:12 chanhlt