@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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/use/list.js +3 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrai-innovations/reactive-helpers",
3
- "version": "4.0.0",
3
+ "version": "4.1.0",
4
4
  "description": "VueJS 3 utility composition functions to help manipulate objects and lists.",
5
5
  "main": "index.js",
6
6
  "directories": {
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"),