@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.js
CHANGED
|
@@ -1394,7 +1394,7 @@ function createApiHooksBase(client) {
|
|
|
1394
1394
|
}, [JSON.stringify(params)]);
|
|
1395
1395
|
return { data, error, isFetching, isLoading, refetch: fetchData };
|
|
1396
1396
|
}
|
|
1397
|
-
function useFetchList(params) {
|
|
1397
|
+
function useFetchList(params, config) {
|
|
1398
1398
|
const [data, setData] = (0, import_react.useState)(null);
|
|
1399
1399
|
const [error, setError] = (0, import_react.useState)(null);
|
|
1400
1400
|
const [isFetching, setIsFetching] = (0, import_react.useState)(false);
|
|
@@ -1413,6 +1413,11 @@ function createApiHooksBase(client) {
|
|
|
1413
1413
|
setIsLoading(false);
|
|
1414
1414
|
}
|
|
1415
1415
|
}, [JSON.stringify(params)]);
|
|
1416
|
+
(0, import_react.useEffect)(function() {
|
|
1417
|
+
if ((config == null ? void 0 : config.fetchOnMount) === true) {
|
|
1418
|
+
fetchData();
|
|
1419
|
+
}
|
|
1420
|
+
}, [fetchData, config == null ? void 0 : config.fetchOnMount]);
|
|
1416
1421
|
return { data, error, isFetching, isLoading, refetch: fetchData };
|
|
1417
1422
|
}
|
|
1418
1423
|
function useCreate() {
|