@inertiajs/react 2.3.8 → 2.3.9
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.
- package/dist/index.esm.js +16 -9
- package/dist/index.esm.js.map +3 -3
- package/dist/index.js +12 -7
- package/dist/index.js.map +2 -2
- package/package.json +2 -2
- package/types/Form.d.ts +2 -1
- package/types/index.d.ts +1 -1
package/types/Form.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { FormComponentSlotProps, FormDataConvertible, Method } from '@inertiajs/core';
|
|
1
|
+
import { FormComponentRef, FormComponentSlotProps, FormDataConvertible, Method } from '@inertiajs/core';
|
|
2
2
|
import React, { ReactNode } from 'react';
|
|
3
3
|
declare const Form: React.ForwardRefExoticComponent<Partial<Pick<import("@inertiajs/core").Visit<import("@inertiajs/core").RequestPayload>, "headers" | "errorBag" | "queryStringArrayFormat" | "showProgress" | "invalidateCacheTags"> & Omit<import("@inertiajs/core").VisitCallbacks<import("@inertiajs/core").RequestPayload>, "onPrefetched" | "onPrefetching">> & {
|
|
4
4
|
method?: Method | Uppercase<Method>;
|
|
@@ -16,4 +16,5 @@ declare const Form: React.ForwardRefExoticComponent<Partial<Pick<import("@inerti
|
|
|
16
16
|
} & Omit<React.FormHTMLAttributes<HTMLFormElement>, "children" | "method" | "headers" | "errorBag" | "queryStringArrayFormat" | "showProgress" | "invalidateCacheTags" | "onCancelToken" | "onBefore" | "onBeforeUpdate" | "onStart" | "onProgress" | "onFinish" | "onCancel" | "onSuccess" | "onError" | "onFlash" | "options" | "action" | "transform" | "onSubmitComplete" | "disableWhileProcessing" | "resetOnSuccess" | "resetOnError" | "setDefaultsOnSuccess" | "validateFiles" | "validationTimeout" | "withAllErrors"> & Omit<React.AllHTMLAttributes<HTMLFormElement>, "children" | "method" | "headers" | "errorBag" | "queryStringArrayFormat" | "showProgress" | "invalidateCacheTags" | "onCancelToken" | "onBefore" | "onBeforeUpdate" | "onStart" | "onProgress" | "onFinish" | "onCancel" | "onSuccess" | "onError" | "onFlash" | "options" | "action" | "transform" | "onSubmitComplete" | "disableWhileProcessing" | "resetOnSuccess" | "resetOnError" | "setDefaultsOnSuccess" | "validateFiles" | "validationTimeout" | "withAllErrors"> & {
|
|
17
17
|
children: ReactNode | ((props: FormComponentSlotProps) => ReactNode);
|
|
18
18
|
} & React.RefAttributes<FormComponentSlotProps>>;
|
|
19
|
+
export declare function useFormContext(): FormComponentRef | undefined;
|
|
19
20
|
export default Form;
|
package/types/index.d.ts
CHANGED
|
@@ -14,7 +14,7 @@ export declare const router: import("@inertiajs/core").Router;
|
|
|
14
14
|
export { default as App } from './App';
|
|
15
15
|
export { default as createInertiaApp } from './createInertiaApp';
|
|
16
16
|
export { default as Deferred } from './Deferred';
|
|
17
|
-
export { default as Form } from './Form';
|
|
17
|
+
export { default as Form, useFormContext } from './Form';
|
|
18
18
|
export { default as Head } from './Head';
|
|
19
19
|
export { default as InfiniteScroll } from './InfiniteScroll';
|
|
20
20
|
export { InertiaLinkProps, default as Link } from './Link';
|