Skip to content

Commit c3402f5

Browse files
committed
fix(table): ADataTable shows wrong pagination meta
fixes #67
1 parent 7bb5341 commit c3402f5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/anu-vue/src/components/data-table/ADataTable.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,7 @@ defineOptions({
3030
const _tableProps = reactivePick(props, Object.keys(tableProps).filter(k => !['rows', 'cols'].includes(k)) as Array<keyof typeof tableProps>)
3131
3232
const _rows = ref<Record<string, unknown>[]>(typeof props.rows !== 'function' ? props.rows : [])
33-
const serverTotal = ref(0)
34-
const _total = ref(typeof props.rows === 'function' ? serverTotal.value : props.rows.length)
33+
const _total = ref(typeof props.rows === 'function' ? 0 : props.rows.length)
3534
3635
// SECTION Calculate column
3736
/*
@@ -118,7 +117,7 @@ const fetchRows = () => {
118117
.then(data => {
119118
const { rows, total } = data
120119
_rows.value = rows
121-
serverTotal.value = total
120+
_total.value = total
122121
})
123122
}
124123
else {

0 commit comments

Comments
 (0)