Home > Blockchain >  Is there any option to specify what item to choose first when v-slide-group is 'mandatory'
Is there any option to specify what item to choose first when v-slide-group is 'mandatory'

Time:12-13

I am using Vuetify component v-slide-group. There is a prop named 'mandatory' which requires at least one item to be selected. Is there any possibility to specify what element should be selected (the first one is selected by default)

<v-slide-group center-active mandatory>
    <v-slide-item v-for="item in items" 
                  :key="item.id" 
                  :value="item.value"
    >
      {{ item.name }}
    </v-slide-item>
</v-slide-group>

in this case the first item of items is chosen, anyhow i wanted 'N' items to be chosen

CodePudding user response:

You can try reading documentation and API of components you are trying to use (for example v-slide-group API in which you can see that you can pass value prop: :value="items[n]" in your case).

  • Related