feat: exposes FieldWithPath type for reuse
This commit is contained in:
@@ -127,6 +127,7 @@ const useField = <T extends unknown>(options: Options): FieldType<T> => {
|
|||||||
formSubmitted: submitted,
|
formSubmitted: submitted,
|
||||||
formProcessing: processing,
|
formProcessing: processing,
|
||||||
setValue,
|
setValue,
|
||||||
|
initialValue,
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -17,4 +17,5 @@ export type FieldType<T> = {
|
|||||||
formSubmitted: boolean
|
formSubmitted: boolean
|
||||||
formProcessing: boolean
|
formProcessing: boolean
|
||||||
setValue: (val: unknown, modifyForm?: boolean) => void
|
setValue: (val: unknown, modifyForm?: boolean) => void
|
||||||
|
initialValue?: T
|
||||||
}
|
}
|
||||||
|
|||||||
1
types.d.ts
vendored
1
types.d.ts
vendored
@@ -29,6 +29,7 @@ export {
|
|||||||
export {
|
export {
|
||||||
Field,
|
Field,
|
||||||
FieldHook,
|
FieldHook,
|
||||||
|
FieldWithPath,
|
||||||
FieldAccess,
|
FieldAccess,
|
||||||
RichTextCustomElement,
|
RichTextCustomElement,
|
||||||
RichTextCustomLeaf,
|
RichTextCustomLeaf,
|
||||||
|
|||||||
Reference in New Issue
Block a user