vuesax-next icon indicating copy to clipboard operation
vuesax-next copied to clipboard

VsSelect doesn't change when I change the array

Open rangeldor opened this issue 3 years ago • 1 comments

If I try to change the initial array, he doesn't change the childOptions, because of this he doesn't set label if the actual length array is bigger than the last length array.

rangeldor avatar Apr 05 '21 18:04 rangeldor

If someone passes by, add a key to the select

          <vs-select
            label="Ville"
            v-model="cityChoice"
            :loading="cityLoading"
            :disabled="cityLoading"
            :key="cities.length" <!-- Add a key in connection with the options table -->
          >
            <vs-option
              v-for="(city, index) in cities"
              :key="index"
              :label="city.city.toString()"
              :value="city.city.toString()"
            >
              {{ city.city }}
            </vs-option>
          </vs-select>

AlanSnt avatar Jul 05 '22 14:07 AlanSnt