[Vuejs]-VueJS 3 Create product filter dependent on each other

1👍

you could use the model from selectedCategoryProducts to make populate the list of options. Because it will be empty initially, you can add a v-if="selectedCategoryProducts" to the select element to no show it unless the first option is selected. No need for using computed.

<select v-model="selectedCategorySub" v-if="selectedCategoryProducts">
  <option  v-for="option in selectedCategoryProducts">{{ option }}</option>
</select>

sfc example

👤Daniel

Leave a comment