From 6067aa3aa1553495cca2e4516ca5c1c294eb203b Mon Sep 17 00:00:00 2001 From: Jaayden Halko Date: Fri, 14 Nov 2025 17:09:06 +0000 Subject: [PATCH] fix: correctly set touched for autofill dynamic parameters (#20769) this resolves #20187 This bug was introduced in PR https://github.com/coder/coder/pull/18894 in CreateWorkspacePageViewExperimental.tsx This PR made a change so that the entire parameter was used instead of just the parameter name to mark an autofilled parameter as touched. The fix here is to just use the parameter name. --- .../CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/site/src/pages/CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx b/site/src/pages/CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx index cf1fd1746c..315c8f357d 100644 --- a/site/src/pages/CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx +++ b/site/src/pages/CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx @@ -119,7 +119,7 @@ export const CreateWorkspacePageViewExperimental: FC< // Only touched fields are sent to the websocket // Autofilled parameters are marked as touched since they have been modified const initialTouched = Object.fromEntries( - parameters.filter((p) => autofillByName[p.name]).map((p) => [p, true]), + parameters.filter((p) => autofillByName[p.name]).map((p) => [p.name, true]), ); // The form parameters values hold the working state of the parameters that will be submitted when creating a workspace