v-autocomplete
v-autocomplete copied to clipboard
min-len conflits when using two autocomplete in the same page
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.