v-autocomplete icon indicating copy to clipboard operation
v-autocomplete copied to clipboard

min-len conflits when using two autocomplete in the same page

Open benjaminbra opened this issue 7 years ago • 0 comments

When creating two autocomplete in the same page. The min-len of the last autocomplete declared is also used by the other autocomplete.

<v-autocomplete :items="searchCommunesItems" 
v-model="form.commune" 
:min-len="1" 
:get-label="getLabelCommune"
:component-item='template' 
@update-items="searchCommunes" 
@change="checkCommuneInput" 
:auto-select-one-item="false" 
:input-attrs="{id: 'commune', autocomplete:'off'}"></v-autocomplete>
<v-autocomplete :items="searchEtbsItems"
v-model="form.etablissement" 
:min-len="2" 
:get-label="getLabelEtabs" 
:component-item='template' 
@update-items="searchEtbs" 
:auto-select-one-item="false" 
@change="checkEtabInput" 
:input-attrs="{id: 'etab', autocomplete:'off'}"></v-autocomplete>

In the exemple, i use a first autocomplete with min-len at 1 and a second autocomplete with min-len at 2. But when i try to search with the first autocomplete, i need 2 chars before having a result showing up.

benjaminbra avatar Oct 23 '18 15:10 benjaminbra