mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user