@burdenoff/microfe-movethewheels 2026.930.1 → 2026.930.2
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/hooks/useRefetchOnLeaveEdit.js +10 -0
- package/dist/movethewheels/hooks/useRefetchOnLeaveEdit.d.ts +7 -0
- package/dist/pages/DriverDetailsPage.js +238 -235
- package/dist/pages/ProductDetailsPage.js +22 -19
- package/dist/pages/RouteDetailsPage.js +274 -271
- package/dist/pages/VehicleDetailsPage.js +28 -25
- package/package.json +1 -1
- package/src/movethewheels/hooks/useRefetchOnLeaveEdit.ts +18 -0
- package/src/movethewheels/pages/DriverDetailsPage.tsx +2 -0
- package/src/movethewheels/pages/ProductDetailsPage.tsx +2 -0
- package/src/movethewheels/pages/RouteDetailsPage.tsx +2 -0
- package/src/movethewheels/pages/VehicleDetailsPage.tsx +2 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useEffect as e, useRef as t } from "react";
|
|
2
|
+
//#region src/movethewheels/hooks/useRefetchOnLeaveEdit.ts
|
|
3
|
+
function n(n, r) {
|
|
4
|
+
let i = t(n);
|
|
5
|
+
e(() => {
|
|
6
|
+
i.current && !n && r(), i.current = n;
|
|
7
|
+
}, [n, r]);
|
|
8
|
+
}
|
|
9
|
+
//#endregion
|
|
10
|
+
export { n as useRefetchOnLeaveEdit };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Detail pages render their `/edit` form from the same route component, so the
|
|
3
|
+
* component (and its record hook) stays mounted across edit → detail. Without a
|
|
4
|
+
* refetch the detail view keeps showing the pre-edit record. Call `refetch`
|
|
5
|
+
* exactly when the edit route is left, never on the initial mount.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useRefetchOnLeaveEdit(isEditRoute: boolean, refetch: () => void): void;
|