We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
inert
1 parent af6ca2c commit 2cf4569Copy full SHA for 2cf4569
packages/react/src/Form.ts
@@ -190,7 +190,11 @@ const Form = forwardRef<FormComponentRef, ComponentProps>(
190
event.preventDefault()
191
submit()
192
},
193
- inert: disableWhileProcessing && form.processing,
+ // Only React 19 supports passing a boolean to the `inert` attribute.
194
+ // To support earlier versions as well, we use the string 'true'.
195
+ // Unfortunately, React 19 treats an empty string as `false`.
196
+ // See: https://github.com/inertiajs/inertia/pull/2536
197
+ inert: disableWhileProcessing && form.processing && 'true',
198
199
typeof children === 'function' ? children(exposed()) : children,
200
)
0 commit comments