Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

238
Visualizações
Uncaught ReferenceError: firstSelectAll is not defined

I have this table with checkboxes. I use computed defined property in <th> v-model to check all the checkboxes in <td>

this is my table:

      <table id="table">
        <tr>
          <th style="text-align: center">
            <input
              type="checkbox"
              name="tableCheckBox"
              v-model="firstSelectAll"
            />
          </th>
          <th style="text-align: right">#</th>
          <th>Name</th>
          <th>Program</th>
          <th>Iteration</th>
          <th>Stream</th>
          <th>Group</th>
        </tr>
        <tr
          v-for="(data, index) in firstFetchUserData"
          :key="data.ind_id"
          :value="data.ind_id"
          style="cursor: pointer"
        >
          <td class="td-checkbox">
            <input
              type="checkbox"
              v-model="selected"
              :value="data"
              number
            />
          </td>
          <td>{{ data.program_name }}</td>
          <td>{{ data.iteration_name }}</td>
          <td>{{ data.stream_name }}</td>
          <td>{{ data.group_name }}</td>
        </tr>
      </table>

and this is my computed property that manages to check all of the checkboxes in <td>

firstSelectAll: {
  get: function () {
    return this.firstFetchUserData
      ? this.selected.length == this.firstFetchUserData.length
      : false;
  },
  set: function (value) {
    var selected = [];

    if (value) {
      this.firstFetchUserData.forEach(function (user) {
        selected.push(user);
      });
    }
    this.selected = selected;
  },
},

you can see in this link Check all checkboxes vuejs, I reference my code to the highest upvote in answers. The thing is on my local it is working perfectly, but on deployment/build, it shows this error when I click the checkbox responsible for checking all the checkboxes:

console error

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda