Skip to content

Commit 6067aa3

Browse files
authored
fix: correctly set touched for autofill dynamic parameters (#20769)
this resolves #20187 This bug was introduced in PR #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.
1 parent f23836d commit 6067aa3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

site/src/pages/CreateWorkspacePage/CreateWorkspacePageViewExperimental.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ export const CreateWorkspacePageViewExperimental: FC<
119119
// Only touched fields are sent to the websocket
120120
// Autofilled parameters are marked as touched since they have been modified
121121
const initialTouched = Object.fromEntries(
122-
parameters.filter((p) => autofillByName[p.name]).map((p) => [p, true]),
122+
parameters.filter((p) => autofillByName[p.name]).map((p) => [p.name, true]),
123123
);
124124

125125
// The form parameters values hold the working state of the parameters that will be submitted when creating a workspace

0 commit comments

Comments
 (0)