diff --git a/src/components/SmartCard.vue b/src/components/SmartCard.vue index a03725aee3..dff154597a 100644 --- a/src/components/SmartCard.vue +++ b/src/components/SmartCard.vue @@ -65,7 +65,7 @@ async function fetch() { for (const row of data) rows.value.push(row); - pagination.value.rowsNumber = totalRows(); + pagination.value.rowsNumber = rows.value.length; pagination.value.page = page; pagination.value.rowsPerPage = rowsPerPage; pagination.value.sortBy = sortBy; @@ -76,7 +76,7 @@ async function fetch() { async function onLoad(...params) { const done = params[1]; - if (totalRows() === 0) return done(false); + if (rows.value.length === 0) return done(false); pagination.value.page = pagination.value.page + 1; @@ -85,10 +85,6 @@ async function onLoad(...params) { const endOfPages = !hasMoreData.value; done(endOfPages); } - -function totalRows() { - return rows.value.length; -}