Skip to content
This repository was archived by the owner on Mar 27, 2025. It is now read-only.

Commit da0569c

Browse files
authored
Merge pull request bootstrap-vue-next#1058 from RuBaWa/main
fix: remove b-table item prop mutation by pagination
2 parents c965067 + 89cffb8 commit da0569c

File tree

1 file changed

+2
-1
lines changed
  • packages/bootstrap-vue-next/src/components/BTable

1 file changed

+2
-1
lines changed

packages/bootstrap-vue-next/src/components/BTable/BTable.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,8 @@ const computedItems = computed(() => {
411411
412412
if (props.perPage !== undefined) {
413413
const startIndex = (props.currentPage - 1) * props.perPage
414-
return items.splice(startIndex, props.perPage)
414+
const endIndex = startIndex + props.perPage > items.length ? items.length : startIndex + props.perPage
415+
return items.slice(startIndex, endIndex)
415416
}
416417
return items
417418
})

0 commit comments

Comments
 (0)