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:
1 parent
508fba83dd
commit
b4f71b70aa
1 file changed
+6
-2
@@ -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