Skip to content

Commit 814355d

Browse files
committed
fix: add wait cursor overlay for suspend
1 parent 96486ce commit 814355d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/Form/Form.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,13 @@ const Form = <TSchema extends z.ZodType<FormDataType>, TData extends z.TypeOf<TS
147147
return (
148148
<form
149149
autoComplete="off"
150-
className={twMerge('w-full', isGrouped ? 'space-y-8 divide-y' : 'space-y-6', className)}
150+
className={twMerge('relative w-full', isGrouped ? 'space-y-8 divide-y' : 'space-y-6', className)}
151151
id={id}
152152
onBlur={revalidateOnBlur ? revalidate : undefined}
153153
onSubmit={(event) => void handleSubmit(event)}
154154
{...props}
155155
>
156+
{isSubmitting && <div className="absolute z-10 h-full w-full cursor-wait" />}
156157
{isGrouped ? (
157158
content.map((fieldGroup, i) => {
158159
return (

0 commit comments

Comments
 (0)