@arrai-innovations/reactive-helpers 4.0.0 → 4.1.0
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/package.json +1 -1
- package/use/list.js +3 -2
package/package.json
CHANGED
package/use/list.js
CHANGED
|
@@ -3,9 +3,10 @@ import { useListCalculated } from "./listCalculated";
|
|
|
3
3
|
import { useListInstance } from "./listInstance";
|
|
4
4
|
import { useListRelated } from "./listRelated";
|
|
5
5
|
import { useListSubscription } from "./listSubscription";
|
|
6
|
+
import { usePagedListInstance } from "./paginatedListInstance";
|
|
6
7
|
|
|
7
8
|
// the big brother of useObject, managing a chain of useList* instances.
|
|
8
|
-
export const useList = ({ props, functions }) => {
|
|
9
|
+
export const useList = ({ props, functions, paged = false }) => {
|
|
9
10
|
const managed = shallowReactive({
|
|
10
11
|
listInstance: null,
|
|
11
12
|
listSubscription: null,
|
|
@@ -14,7 +15,7 @@ export const useList = ({ props, functions }) => {
|
|
|
14
15
|
});
|
|
15
16
|
const es = effectScope();
|
|
16
17
|
|
|
17
|
-
managed.listInstance = useListInstance({
|
|
18
|
+
managed.listInstance = (paged ? usePagedListInstance : useListInstance)({
|
|
18
19
|
crudArgs: toRef(props, "crudArgs"),
|
|
19
20
|
functions,
|
|
20
21
|
retrieveArgs: toRef(props, "retrieveArgs"),
|