mirror of
https://github.com/coder/coder.git
synced 2026-09-21 20:51:01 +08:00
fix: show preset parameters when they have diagnostics (#18258)
Always show preset parameters in CreateWorkspacePageViewExperimental if the preset parameter has any diagnostics, regardless of the showPresetParameters toggle state. This ensures that users can see and address errors in preset parameters even when the "Show preset parameters" toggle is disabled. Fixes coder/internal#651 --------- Co-authored-by: blink-so[bot] <211532188+blink-so[bot]@users.noreply.github.com> Co-authored-by: Jaayden Halko <jaayden@coder.com>
This commit is contained in:
co-authored by
Jaayden Halko
parent
508fba83dd
commit
b4f71b70aa
@@ -620,8 +620,12 @@ export const CreateWorkspacePageViewExperimental: FC<
|
||||
creatingWorkspace ||
|
||||
isPresetParameter;
|
||||
|
||||
// Hide preset parameters if showPresetParameters is false
|
||||
if (!showPresetParameters && isPresetParameter) {
|
||||
// Always show preset parameters if they have any diagnostics
|
||||
if (
|
||||
!showPresetParameters &&
|
||||
isPresetParameter &&
|
||||
parameter.diagnostics.length === 0
|
||||
) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user