Skip to content

Commit 766277c

Browse files
authored
fix: disable submit button on diagnostics error (#17900)
1 parent 4e0fc6e commit 766277c

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -516,7 +516,18 @@ export const CreateWorkspacePageViewExperimental: FC<
516516
<div className="flex flex-row justify-end">
517517
<Button
518518
type="submit"
519-
disabled={creatingWorkspace || !hasAllRequiredExternalAuth}
519+
disabled={
520+
creatingWorkspace ||
521+
!hasAllRequiredExternalAuth ||
522+
diagnostics.some(
523+
(diagnostic) => diagnostic.severity === "error",
524+
) ||
525+
parameters.some((parameter) =>
526+
parameter.diagnostics.some(
527+
(diagnostic) => diagnostic.severity === "error",
528+
),
529+
)
530+
}
520531
>
521532
<Spinner loading={creatingWorkspace} />
522533
Create workspace

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy