2
votes

i have a simple v-combobox where i can select/deselect multiple items from a list of object.

<div id="app">
  <v-app>
    <v-layout column>
      <v-form v-model="valid">
        <v-combobox
          v-model="selectedItems"
          item-text="name"
          item-value="id"
          :items="itemsList"
          label="Items"
          multiple
          clerable
          persistent-hint
          chips>
          </v-combobox>
        <div>{{selectedItems}}</div>
        </v-form>
     </v-layout>
  </v-app>
</div>

https://codepen.io/anon/pen/pYjZaN The problem is when i write a search string in the field and then click outside i get a chip with it instead of just doing nothing. It looks like it depend on v-form, removing it everything will work fine. Anyone know how to deal with this?

1

1 Answers

0
votes

The reason is that you are using v-combobox. From their website: "With Combobox, you can allow a user to create new values that may not be present in a provided items list." Try v-autocomplete and now if you try search a string that does not exist in your items list, you will get "data not available"