@griddo/ax 11.11.3-rc.0 → 11.11.3

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.
Files changed (2) hide show
  1. package/package.json +2 -2
  2. package/src/hooks/forms.tsx +13 -10
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@griddo/ax",
3
3
  "description": "Griddo Author Experience",
4
- "version": "11.11.3-rc.0",
4
+ "version": "11.11.3",
5
5
  "authors": [
6
6
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
7
7
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -217,5 +217,5 @@
217
217
  "publishConfig": {
218
218
  "access": "public"
219
219
  },
220
- "gitHead": "9711475ea006516930779a19a6ed56502b6c2454"
220
+ "gitHead": "6d836cec67937b9e209e1d69f035d34f7d8aa03f"
221
221
  }
@@ -6,7 +6,7 @@ import type { FormContent, IUser } from "@ax/types";
6
6
 
7
7
  import isEqual from "lodash.isequal";
8
8
 
9
- const DEBUG_DIRTY = true;
9
+ const DEBUG_DIRTY = false;
10
10
 
11
11
  const useDebounce = (value: any) => {
12
12
  // State and setters for debounced value
@@ -136,15 +136,18 @@ const useIsDirty = (
136
136
  return false;
137
137
  }, [prevContent, updatedValues, debug]);
138
138
 
139
- const resetDirty = useCallback((reseting = true, forceUpdate = false) => {
140
- if (debug) {
141
- console.log(`[useIsDirty] resetDirty(resetting=${reseting}, force=${forceUpdate})`);
142
- }
143
- setIsDirty(false);
144
- setIsSaved(true);
145
- reseting && setIsResetting(true);
146
- setForce(forceUpdate);
147
- }, [debug]);
139
+ const resetDirty = useCallback(
140
+ (reseting = true, forceUpdate = false) => {
141
+ if (debug) {
142
+ console.log(`[useIsDirty] resetDirty(resetting=${reseting}, force=${forceUpdate})`);
143
+ }
144
+ setIsDirty(false);
145
+ setIsSaved(true);
146
+ reseting && setIsResetting(true);
147
+ setForce(forceUpdate);
148
+ },
149
+ [debug],
150
+ );
148
151
 
149
152
  // biome-ignore lint/correctness/useExhaustiveDependencies: TODO: fix this
150
153
  useEffect(() => {