sprintify-ui 0.8.55 → 0.8.56
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/sprintify-ui.es.js
CHANGED
|
@@ -24569,7 +24569,10 @@ const HB = { class: "grow" }, UB = {
|
|
|
24569
24569
|
), O = T(() => _.value.page && parseInt(_.value.page + "") ? parseInt(_.value.page + "") : 1), j = T(() => a.value == s ? ce.value : nt(r.items)), { items: G, paginationMetadata: be, lastPage: Te } = zp(
|
|
24570
24570
|
j,
|
|
24571
24571
|
O,
|
|
24572
|
-
T(() =>
|
|
24572
|
+
T(() => {
|
|
24573
|
+
if (a.value != s)
|
|
24574
|
+
return r.perPage;
|
|
24575
|
+
})
|
|
24573
24576
|
), Oe = T(() => a.value == s ? G.value : _t(xt(G.value)));
|
|
24574
24577
|
function nt(ge) {
|
|
24575
24578
|
if (!ge)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ComputedRef, Ref } from 'vue';
|
|
2
2
|
import { Collection, PaginatedCollection, ResourceCollection, PaginationMetadata } from '@/types';
|
|
3
|
-
export declare function useHasPaginatedData(data: Ref<Collection | PaginatedCollection | ResourceCollection | null | undefined>, page?: ComputedRef<number>, perPage?: ComputedRef<number>): {
|
|
3
|
+
export declare function useHasPaginatedData(data: Ref<Collection | PaginatedCollection | ResourceCollection | null | undefined>, page?: ComputedRef<number>, perPage?: ComputedRef<number | undefined>): {
|
|
4
4
|
items: ComputedRef<Collection>;
|
|
5
5
|
paginationMetadata: ComputedRef<PaginationMetadata | null>;
|
|
6
6
|
lastPage: ComputedRef<number>;
|
package/package.json
CHANGED
|
@@ -721,7 +721,13 @@ const dataInternal = computed<ResourceCollection | PaginatedCollection | Collect
|
|
|
721
721
|
const { items, paginationMetadata, lastPage } = useHasPaginatedData(
|
|
722
722
|
dataInternal,
|
|
723
723
|
page,
|
|
724
|
-
computed(() =>
|
|
724
|
+
computed(() => {
|
|
725
|
+
if (dataMode.value == REMOTE) {
|
|
726
|
+
return undefined;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
return props.perPage;
|
|
730
|
+
}),
|
|
725
731
|
);
|
|
726
732
|
|
|
727
733
|
const itemsInternal = computed(() => {
|
|
@@ -11,7 +11,7 @@ import { getItems } from '@/utils/getApiData';
|
|
|
11
11
|
export function useHasPaginatedData(
|
|
12
12
|
data: Ref<Collection | PaginatedCollection | ResourceCollection | null | undefined>,
|
|
13
13
|
page?: ComputedRef<number>,
|
|
14
|
-
perPage?: ComputedRef<number>,
|
|
14
|
+
perPage?: ComputedRef<number | undefined>,
|
|
15
15
|
) {
|
|
16
16
|
const items = computed(() => {
|
|
17
17
|
return getItems(data.value);
|