mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
fix: disable submit button on diagnostics error (#17900)
This commit is contained in:
@@ -516,7 +516,18 @@ export const CreateWorkspacePageViewExperimental: FC<
|
||||
<div className="flex flex-row justify-end">
|
||||
<Button
|
||||
type="submit"
|
||||
disabled={creatingWorkspace || !hasAllRequiredExternalAuth}
|
||||
disabled={
|
||||
creatingWorkspace ||
|
||||
!hasAllRequiredExternalAuth ||
|
||||
diagnostics.some(
|
||||
(diagnostic) => diagnostic.severity === "error",
|
||||
) ||
|
||||
parameters.some((parameter) =>
|
||||
parameter.diagnostics.some(
|
||||
(diagnostic) => diagnostic.severity === "error",
|
||||
),
|
||||
)
|
||||
}
|
||||
>
|
||||
<Spinner loading={creatingWorkspace} />
|
||||
Create workspace
|
||||
|
||||
Reference in New Issue
Block a user