bootstrap-vue / bootstrap-vue

BootstrapVue provides one of the most comprehensive implementations of Bootstrap v4 for Vue.js. With extensive and automated WAI-ARIA accessibility markup.

Home Page:https://bootstrap-vue.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

@row-selected in b-table not fired after calling multiple selectRow function

stunited-thien opened this issue · comments

Describe the bug

I used <b-table @row-selected> with pagination to display a list of items. For each row, I used the <template #cell(selected)= { rowSelected, item }> for <b-form-checkbox :checked="rowSelected" @change="rowSelected ? unSelectListRow(item) : selectListRow(item)"> . The @row-selected is used to get and change <b-form-checkbox v-model="isAllSelected"> if all items on the current page have been selected. The @row-selected works fine when I select items by using the selectRow function wrapper (selectListRow) but not when I try using it to maintain the checkbox state of the selected item after refetch the items in <b-table>.

Steps to reproduce the bug

Expected behavior

@row-selected will be fired after the selectRow loop ends

Versions

Libraries:

  • BootstrapVue: 2.23.0
  • Bootstrap: 4.6.2
  • Vue: 3.2.47

Environment:

  • Device: PC
  • OS: Window 11
  • Browser: Edge
  • Version: 120.0.2210.77

Demo link

Additional context

Add any other context about the bug here.