|
|
@ -187,8 +187,10 @@ export function useViewData( |
|
|
|
controller.value = CancelToken.source() |
|
|
|
controller.value = CancelToken.source() |
|
|
|
|
|
|
|
|
|
|
|
isPaginationLoading.value = true |
|
|
|
isPaginationLoading.value = true |
|
|
|
|
|
|
|
let response |
|
|
|
|
|
|
|
|
|
|
|
const response = !isPublic.value |
|
|
|
try { |
|
|
|
|
|
|
|
response = !isPublic.value |
|
|
|
? await api.dbViewRow.list( |
|
|
|
? await api.dbViewRow.list( |
|
|
|
'noco', |
|
|
|
'noco', |
|
|
|
base.value.id!, |
|
|
|
base.value.id!, |
|
|
@ -204,7 +206,13 @@ export function useViewData( |
|
|
|
{ cancelToken: controller.value.token }, |
|
|
|
{ cancelToken: controller.value.token }, |
|
|
|
) |
|
|
|
) |
|
|
|
: await fetchSharedViewData({ sortsArr: sorts.value, filtersArr: nestedFilters.value }) |
|
|
|
: await fetchSharedViewData({ sortsArr: sorts.value, filtersArr: nestedFilters.value }) |
|
|
|
|
|
|
|
} catch (error) { |
|
|
|
|
|
|
|
// if the request is canceled, then do nothing
|
|
|
|
|
|
|
|
if (error.code === 'ERR_CANCELED') { |
|
|
|
|
|
|
|
return |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
throw 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 |
|
|
|