@erpp/react-api-cronos-frontend 1.0.9 → 1.0.11
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/index.d.mts +215 -212
- package/dist/index.d.ts +215 -212
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +7 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -835,7 +835,7 @@ var AdeudoAPI = class extends APIClientBase {
|
|
|
835
835
|
var AdeudoAPI_default = AdeudoAPI;
|
|
836
836
|
|
|
837
837
|
// src/infrastructure/api/utils/createApiHooks.ts
|
|
838
|
-
import { useState, useCallback } from "react";
|
|
838
|
+
import { useState, useCallback, useEffect } from "react";
|
|
839
839
|
|
|
840
840
|
// src/infrastructure/api/utils/globalErrorLogger.ts
|
|
841
841
|
import fs from "fs";
|
|
@@ -891,7 +891,7 @@ function createApiHooksBase(client) {
|
|
|
891
891
|
}, [JSON.stringify(params)]);
|
|
892
892
|
return { data, error, isFetching, isLoading, refetch: fetchData };
|
|
893
893
|
}
|
|
894
|
-
function useFetchList(params) {
|
|
894
|
+
function useFetchList(params, config) {
|
|
895
895
|
const [data, setData] = useState(null);
|
|
896
896
|
const [error, setError] = useState(null);
|
|
897
897
|
const [isFetching, setIsFetching] = useState(false);
|
|
@@ -910,6 +910,11 @@ function createApiHooksBase(client) {
|
|
|
910
910
|
setIsLoading(false);
|
|
911
911
|
}
|
|
912
912
|
}, [JSON.stringify(params)]);
|
|
913
|
+
useEffect(function() {
|
|
914
|
+
if ((config == null ? void 0 : config.fetchOnMount) === true) {
|
|
915
|
+
fetchData();
|
|
916
|
+
}
|
|
917
|
+
}, [fetchData, config == null ? void 0 : config.fetchOnMount]);
|
|
913
918
|
return { data, error, isFetching, isLoading, refetch: fetchData };
|
|
914
919
|
}
|
|
915
920
|
function useCreate() {
|