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

163
Views
Why is BootstrapVue not displaying the selected checkboxes inside my table when changing pages?

I have included checkboxes inside my b-table for certain columns by doing the following:

<template #cell()="data">
    <b-form-checkbox v-model="data.checkbox" @change="clickedCheckbox(data)"></b-form-checkbox>
</template>

The code for when a checkbox is clicked:

clickedCheckbox(data) {
  if (data.checkbox) {
    this.$set(data, 'checkbox', true);
    this.checkmarkedBoxes.push(data);
  } else {
    this.$set(data, 'checkbox', false);
    for (let i = 0; i < this.checkmarkedBoxes.length; i += 1) {
      if (this.checkmarkedBoxes[i].item.name === data.item.name) {
        this.checkmarkedBoxes.splice(i, 1);
        break;
      }
    }
  }
}

I understand with BootstrapVue there are known limitations for the b-table when combining it with pagination, which is why I used this.$set to maintain the selected checkboxes. However, it's not working. For example, let's say I click a few checkboxes on page 1 of my table, go to page 2, then go back to page 1, the checkboxes that were selected are no longer selected. The checkmarkedBoxes array still has the previously selected checkboxes, so I don't know why even after using this.$set it still does not maintain the selections. Does anybody know how to fix this?

about 4 years ago · Juan Pablo Isaza
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!