Browse Source

chore(nc-gui): remove unnecessary ? operator

pull/3622/head
Wing-Kam Wong 2 years ago
parent
commit
c106b8ecc8
  1. 6
      packages/nc-gui/composables/useViewData.ts

6
packages/nc-gui/composables/useViewData.ts

@ -82,7 +82,7 @@ export function useViewData(
const queryParams = computed(() => ({
offset: ((paginationData.value.page ?? 0) - 1) * (paginationData.value.pageSize ?? appInfoDefaultLimit),
limit: paginationData.value?.pageSize ?? appInfoDefaultLimit,
limit: paginationData.value.pageSize ?? appInfoDefaultLimit,
where: where?.value ?? '',
}))
@ -118,9 +118,9 @@ export function useViewData(
// total records in the current table
const count = paginationData.value?.totalRows ?? Infinity
// the number of rows in a page
const size = paginationData.value?.pageSize ?? appInfoDefaultLimit
const size = paginationData.value.pageSize ?? appInfoDefaultLimit
// the current page number
const currentPage = paginationData.value?.page ?? 1
const currentPage = paginationData.value.page ?? 1
// the maximum possible page given the current count and the size
const mxPage = Math.ceil(count / size)
// calculate targetPage where 1 <= targetPage <= mxPage

Loading…
Cancel
Save