Comparing version 0.3.0-beta.9 to 0.3.0-beta.10
@@ -406,5 +406,7 @@ // src/internal/path.ts | ||
} | ||
const keys = registeredKeys.getValue(); | ||
keys.delete(key); | ||
registeredKeys.setValue(keys); | ||
if (!registeredKeys.closed) { | ||
const keys = registeredKeys.getValue(); | ||
keys.delete(key); | ||
registeredKeys.setValue(keys); | ||
} | ||
}; | ||
@@ -411,0 +413,0 @@ return { |
@@ -465,5 +465,7 @@ var __create = Object.create; | ||
} | ||
const keys = registeredKeys.getValue(); | ||
keys.delete(key); | ||
registeredKeys.setValue(keys); | ||
if (!registeredKeys.closed) { | ||
const keys = registeredKeys.getValue(); | ||
keys.delete(key); | ||
registeredKeys.setValue(keys); | ||
} | ||
}; | ||
@@ -470,0 +472,0 @@ return { |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
import { FormRef } from "../internal/formRef"; | ||
export declare function getFormErrors(formRef: FormRef<any>): any; |
import { FormRef } from "../internal/formRef"; | ||
export declare const getFormValue: <T>(formRef: FormRef<T>) => T; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
import { FormRef } from "../internal/formRef"; | ||
import { Paths } from "../internal/path"; | ||
export declare const resetForm: <T>(formRef: FormRef<T>, keys?: Paths<T>[]) => void; |
import { ErrorResult, FormRef } from "../internal/formRef"; | ||
import { Paths } from "../internal/path"; | ||
export declare const setFieldError: <TValues>(formRef: FormRef<TValues>, key: Paths<TValues>, error: ErrorResult) => void; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
import { FormRef } from "../internal/formRef"; | ||
import { Paths } from "../internal/path"; | ||
export declare const touchFields: <TValues>(formRef: FormRef<TValues>, keys?: Paths<TValues>[], touch?: boolean) => void; |
import { FormRef } from "../internal/formRef"; | ||
import { Paths } from "../internal/path"; | ||
export declare const unregisterControl: <TValues, P extends Paths<TValues>>(ref: FormRef<TValues>, key: P) => void; |
@@ -0,0 +0,0 @@ /// <reference types="react" /> |
@@ -0,0 +0,0 @@ export * from "./useControl"; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
import { FormRef, FormRefOptions } from "../internal/formRef"; | ||
export declare const useForm: <TValues extends Record<string, any> = Record<string, any>>(options?: FormRefOptions<TValues>) => FormRef<TValues>; |
import { FormRef } from "../internal/formRef"; | ||
export declare function useFormValue<T, R>(mapFn: (value: T) => R, eqFn?: (a: R, b: R) => boolean): R; | ||
export declare function useFormValue<T, R>(formRef: FormRef<T>, mapFn: (value: T) => R, eqFn?: (a: R, b: R) => boolean): R; |
@@ -0,0 +0,0 @@ import { RefCallback } from "react"; |
import { FormRef } from "../internal/formRef"; | ||
export declare function useIsPristine<TValues>(formRef?: FormRef<TValues>): boolean; |
@@ -0,0 +0,0 @@ import { FormRef } from "../internal/formRef"; |
@@ -0,0 +0,0 @@ export { getFieldChanges } from "./commands/getFieldChanges"; |
@@ -0,0 +0,0 @@ import { State } from "derive-state"; |
@@ -0,0 +0,0 @@ /** |
@@ -0,0 +0,0 @@ import { State, Stateless, StateObservable } from "derive-state"; |
@@ -0,0 +0,0 @@ import { State } from "derive-state"; |
export declare const subfield: <T extends object>(obj: T) => T; | ||
export declare const isSubfield: (obj: any) => boolean; |
import { FormRef } from "./formRef"; | ||
export declare function useHookParams<TValues, TParams extends unknown[] = []>(args: unknown[]): [FormRef<TValues>, ...TParams]; |
export declare function useLatestRef<T>(value: T): { | ||
current: T; | ||
}; |
@@ -0,0 +0,0 @@ import { Paths, ValueOfPath } from "./internal/path"; |
{ | ||
"version": "0.3.0-beta.9", | ||
"version": "0.3.0-beta.10", | ||
"license": "MIT", | ||
@@ -62,2 +62,2 @@ "main": "dist/index.js", | ||
} | ||
} | ||
} |
2115
93789