Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

214
Views
¿Cómo marcar todas las casillas de verificación cuando se cambia de componente en vuetify?

Quiero marcar una lista de casillas de verificación cuando cambie un interruptor en V. Lo que tengo es esto:

Este es un componente de cambio, si selectAll es verdadero, quiero marcar todas las casillas de verificación:

 <v-switch style="padding-right:15px;" v-model="selectAll" @change="handleChanging"> </v-switch>

Aquí está la lista, cada elemento tiene una casilla de verificación antes:

 <v-list-item v-for="(item, index) in itemsEducators" :key="index"> <v-list-item-action> <v-checkbox :key="item.title" :input-value="item.checked"> </v-checkbox> </v-list-item-action> <v-list-item-content> <v-list-item-title>{{ item.title }}</v-list-item-title> <v-list-item-subtitle>{{ item.institution }} </v-list-item-subtitle> </v-list-item-content> </v-list-item>

Una aquí es la función js:

 methods: { handleChanging() { if (this.selectAll === true) { //here I want to check all checkboxes } else { //here to uncheck all } }

}

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puedes hacerlo usando esto:

 handleChanging() { if (this.selectAll === true) { this.itemsEducators.forEach(x => x.checked = true); } else { this.itemsEducators.forEach(x => x.checked = false); } }
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!