@dmitryvim/form-builder 0.3.2 → 0.3.4

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.
@@ -173,4 +173,5 @@ export declare class FormBuilderInstance {
173
173
  * Destroy instance and clean up resources
174
174
  */
175
175
  destroy(): void;
176
+ private disconnectEnableIfObservers;
176
177
  }
@@ -13,4 +13,14 @@ export interface State {
13
13
  syntheticElementIds: WeakMap<Element, string>;
14
14
  /** Counter for generating unique synthetic IDs. */
15
15
  syntheticElementIdCounter: number;
16
+ /**
17
+ * Pending MutationObservers from setupEnableIfListeners that are waiting for a
18
+ * dependency input to appear in the DOM. They must be disconnected on destroy()
19
+ * (and on every renderForm) — otherwise they survive the instance lifecycle and
20
+ * later attach orphan change/input listeners to inputs of a *new* instance that
21
+ * happens to mount into the same container, causing
22
+ * "Cannot re-evaluate enableIf: formRoot is null" once the orphan callbacks fire
23
+ * with a torn-down ctx. Reproducible under React StrictMode (double mount).
24
+ */
25
+ enableIfObservers: Set<MutationObserver>;
16
26
  }
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "publishConfig": {
4
4
  "access": "public"
5
5
  },
6
- "version": "0.3.2",
6
+ "version": "0.3.4",
7
7
  "description": "A reusable JSON schema form builder library",
8
8
  "main": "./dist/cjs/index.cjs",
9
9
  "module": "./dist/esm/index.js",