Skip to content

Commit

Permalink
fix: small tweak to pagination buttons
Browse files Browse the repository at this point in the history
  • Loading branch information
mesqueeb committed Apr 26, 2024
1 parent 4963276 commit 1065ec1
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/ui/src/components/MagnetarTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -297,9 +297,11 @@ const rowsShown = computed(() => {
})
const pageIndex = ref(0)
const pageCountFetched = computed<number>(() =>
pageSize.value ? Math.ceil(rowsAll.value.length / pageSize.value) : rowsAll.value.length ? 1 : 0
)
const pageCountFetched = computed<number>(() => {
if (!pageSize.value) return rowsAll.value.length ? 1 : 0
if (props.filterDataFn) return Math.ceil(rowsFiltered.value.length / pageSize.value)
return Math.ceil(rowsAll.value.length / pageSize.value)
})
const pageCountHypothetical = computed<number>(() => {
if (!pageSize.value) return 1
if (props.filterDataFn) return Math.ceil(rowsFiltered.value.length / pageSize.value)
Expand Down

0 comments on commit 1065ec1

Please sign in to comment.