Skip to content

Commit 0c9133d

Browse files
committed
fix: c-list-page did not correctly handle noCount: true
1 parent 3c69915 commit 0c9133d

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 6.0.2
22
- Fix error in c-select when keypress event has no key.
33
- Accept problem details error messages in API Callers.
4+
- Fix `c-list-page` not correctly handling `noCount: true` lists.
45

56
# 6.0.1
67
- `createAspNetCoreHmrPlugin` now displays NPM package mismatches with the standard vite overlay instead of a custom overlay.

playground/Coalesce.Web.Vue3/src/components/test.vue

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<template>
22
<v-container grid-list-lg>
3+
<c-list-pagination :list="personList"></c-list-pagination>
4+
35
<c-loader-status :loaders="{ 'no-initial-content': [caseVm.$load] }">
46
<c-select
57
for="Person"

src/coalesce-vue-vuetify3/src/components/admin/c-admin-audit-log-page.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ function timeDiff(current: AuditLogBase, older?: AuditLogBase) {
392392
function timeDiffClass(current: AuditLogBase, older?: AuditLogBase) {
393393
if (!older) return "";
394394
const diff = current.date!.valueOf() - (older?.date ?? 0).valueOf();
395-
return diff == 0 ? "grey--text" : diff > 0 ? "text-success" : "text-error";
395+
return diff == 0 ? "text-grey" : diff > 0 ? "text-success" : "text-error";
396396
}
397397
398398
const filter = (listVm.$params.filter = reactive({

src/coalesce-vue-vuetify3/src/components/input/c-list-page.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,9 @@ const effectivePage = computed(() => {
5353
// This is done in this component and not in the ListViewModel itself
5454
// because if we modify $page when we get a response from the server,
5555
// autoload lists will perform a duplicate load.
56+
if (props.list.$pageCount == -1) {
57+
return props.list.$page;
58+
}
5659
return Math.min(props.list.$page, props.list.$pageCount ?? props.list.$page);
5760
});
5861
</script>

0 commit comments

Comments
 (0)