@arrai-innovations/reactive-helpers 8.3.2 → 8.3.3

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@arrai-innovations/reactive-helpers",
3
- "version": "8.3.2",
3
+ "version": "8.3.3",
4
4
  "description": "VueJS 3 utility composition functions to help manipulate objects and lists.",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -175,7 +175,7 @@ export function useObjectSubscription({
175
175
  awaitableWithCancel: subscribe,
176
176
  watchArguments: reactive({
177
177
  intendToSubscribe: toRef(state, "intendToSubscribe"),
178
- listArgs: toRef(parentState, "id"),
178
+ id: toRef(parentState, "id"),
179
179
  retrieveArgs: toRef(parentState, "retrieveArgs"),
180
180
  }),
181
181
  clearActiveOnResolved: false,
@@ -184,10 +184,15 @@ export function useObjectSubscription({
184
184
  retrieveIntent = useCancellableIntent({
185
185
  awaitableWithCancel: objectInstance.retrieve,
186
186
  watchArguments: reactive({
187
- intendToSubscribe: toRef(state, "intendToRetrieve"),
188
- listArgs: toRef(parentState, "id"),
187
+ intendToRetrieve: toRef(state, "intendToRetrieve"),
188
+ id: toRef(parentState, "id"),
189
189
  retrieveArgs: toRef(parentState, "retrieveArgs"),
190
190
  }),
191
+ // delay triggering a retrieve until the last retrieve has finished/cancelled
192
+ // cancel can still be triggered
193
+ guardArguments: reactive({
194
+ loading: toRef(state, "loading"),
195
+ }),
191
196
  });
192
197
  });
193
198