Skip to content

Commit

Permalink
fix(table): ADataTable shows wrong pagination meta
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Jan 11, 2023
1 parent 7bb5341 commit c3402f5
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/anu-vue/src/components/data-table/ADataTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ defineOptions({
const _tableProps = reactivePick(props, Object.keys(tableProps).filter(k => !['rows', 'cols'].includes(k)) as Array<keyof typeof tableProps>)
const _rows = ref<Record<string, unknown>[]>(typeof props.rows !== 'function' ? props.rows : [])
const serverTotal = ref(0)
const _total = ref(typeof props.rows === 'function' ? serverTotal.value : props.rows.length)
const _total = ref(typeof props.rows === 'function' ? 0 : props.rows.length)
// SECTION Calculate column
/*
Expand Down Expand Up @@ -118,7 +117,7 @@ const fetchRows = () => {
.then(data => {
const { rows, total } = data
_rows.value = rows
serverTotal.value = total
_total.value = total
})
}
else {
Expand Down

0 comments on commit c3402f5

Please sign in to comment.