Browse Source

refactor: count fallback in singleQuery

pull/8295/head
Pranav C 7 months ago
parent
commit
1f1319a38c
  1. 2
      packages/nc-gui/components/smartsheet/Pagination.vue
  2. 2
      packages/nc-gui/composables/useViewData.ts

2
packages/nc-gui/components/smartsheet/Pagination.vue

@ -118,7 +118,7 @@ const renderAltOrOptlKey = () => {
/> />
<div v-else class="mx-auto flex items-center mt-n1" style="max-width: 250px"> <div v-else class="mx-auto flex items-center mt-n1" style="max-width: 250px">
<span class="text-xs" style="white-space: nowrap"> Change page:</span> <span class="text-xs" style="white-space: nowrap"> Change page:</span>
<a-input :value="page" size="small" class="ml-1 !text-xs" type="number" @keydown.enter="changePage(page)"> <a-input size="small" class="ml-1 !text-xs" type="number" @keydown.enter="changePage(page)">
<template #suffix> <template #suffix>
<component :is="iconMap.returnKey" class="mt-1" @click="changePage(page)" /> <component :is="iconMap.returnKey" class="mt-1" @click="changePage(page)" />
</template> </template>

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

@ -215,7 +215,7 @@ export function useViewData(
return message.error(await extractSdkResponseErrorMsg(error)) return message.error(await extractSdkResponseErrorMsg(error))
} }
formattedData.value = formatData(response.list) formattedData.value = formatData(response.list)
paginationData.value = response.pageInfo paginationData.value = response.pageInfo || {}
isPaginationLoading.value = false isPaginationLoading.value = false
// to cater the case like when querying with a non-zero offset // to cater the case like when querying with a non-zero offset

Loading…
Cancel
Save