monorise 0.0.2-dev.2 → 0.0.2-dev.4

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.
@@ -1379,10 +1379,10 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
1379
1379
  }
1380
1380
  }, [all, params.all]);
1381
1381
  useEffect2(() => {
1382
- if (!isFirstFetched) {
1382
+ if (!isFirstFetched || (opts == null ? void 0 : opts.forceFetch)) {
1383
1383
  listEntities(entityType, { skRange, all }, opts);
1384
1384
  }
1385
- }, [all, entityType, skRange, opts, isFirstFetched]);
1385
+ }, [all, entityType, skRange, opts, isFirstFetched, opts == null ? void 0 : opts.forceFetch]);
1386
1386
  useEffect2(() => {
1387
1387
  var _a;
1388
1388
  let queryTimeout;
@@ -1501,7 +1501,7 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
1501
1501
  const isLoading = useLoadStore2(requestKey);
1502
1502
  const error = useErrorStore2(requestKey);
1503
1503
  useEffect2(() => {
1504
- if (!isFirstFetched && byEntityType && entityType && byId) {
1504
+ if (byEntityType && entityType && byId && (!isFirstFetched || (opts == null ? void 0 : opts.forceFetch))) {
1505
1505
  listEntitiesByEntity(
1506
1506
  byEntityType,
1507
1507
  entityType,
@@ -1536,7 +1536,21 @@ var initCoreActions = (monoriseStore, appActions, coreService2) => {
1536
1536
  requestKey,
1537
1537
  error,
1538
1538
  isFirstFetched,
1539
- lastKey
1539
+ lastKey,
1540
+ refetch: async () => {
1541
+ if (byEntityType && entityType && byId) {
1542
+ return await listEntitiesByEntity(
1543
+ byEntityType,
1544
+ entityType,
1545
+ byId,
1546
+ __spreadProps(__spreadValues({}, opts), {
1547
+ forceFetch: true,
1548
+ stateKey
1549
+ }),
1550
+ chainEntityQuery
1551
+ );
1552
+ }
1553
+ }
1540
1554
  }, lastKey && {
1541
1555
  listMore: () => {
1542
1556
  if (byEntityType && entityType && byId) {