@appcorp/fusion-storybook 0.3.41 → 0.3.43
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.
|
@@ -398,16 +398,16 @@ export const useFeeStructureModule = () => {
|
|
|
398
398
|
// ============================================================================
|
|
399
399
|
// 1.4.9 EFFECTS
|
|
400
400
|
// ============================================================================
|
|
401
|
+
// Sync ref to always point at latest listFetchNow (avoids stale closure in callbacks)
|
|
402
|
+
useEffect(() => {
|
|
403
|
+
listFetchNowRef.current = listFetchNow;
|
|
404
|
+
}, [listFetchNow]);
|
|
401
405
|
useEffect(() => {
|
|
402
406
|
var _a;
|
|
403
407
|
if (!schoolId)
|
|
404
408
|
return;
|
|
405
409
|
(_a = listFetchNowRef.current) === null || _a === void 0 ? void 0 : _a.call(listFetchNowRef);
|
|
406
410
|
}, [dispatch, listParams, showToast, t, schoolId]);
|
|
407
|
-
// Sync ref to always point at latest listFetchNow (avoids stale closure in callbacks)
|
|
408
|
-
useEffect(() => {
|
|
409
|
-
listFetchNowRef.current = listFetchNow;
|
|
410
|
-
}, [listFetchNow]);
|
|
411
411
|
// ============================================================================
|
|
412
412
|
// 1.4.10 RETURN
|
|
413
413
|
// ============================================================================
|