0👍
✅
Use the v-model="product.carrier_id"
and :value="carrier.id"
and use a computed property to extract the name.
computed: {
carrier_name() {
const carrier = this.carriers.find(carrier => carrier.id === this.product.carrier_id)
return carrier ? carrier.name : ''
}
}
.
<div v-if="carrier_name === 'Custom'"> ...
Source:stackexchange.com