[Vuejs]-How to check only the first radio in vuejs v-for?

1👍

This is how to do:

<div v-for="(element,index) in elements" :key="element.id" class="col">
    <input type="radio" name="test[]" :value="element.id" :checked="index===0 ? true: false">
</div>
👤Amine

Leave a comment