mirror of
https://github.com/coder/coder.git
synced 2026-09-22 05:05:20 +08:00
fix: render non-typed parameter changes immediately (#24755)
This was already done for the workspace creation page, but not the edit page, as it does not share the base form, so all I did was copy that fix into the edit page.
This commit is contained in:
+8
-1
@@ -88,7 +88,14 @@ export const WorkspaceParametersPageViewExperimental: FC<
|
||||
formInputs[parameter.name] = value;
|
||||
sendMessage(formInputs);
|
||||
},
|
||||
500,
|
||||
(parameter: PreviewParameter, _value: string) => {
|
||||
// Return a debounce for string fields (those that involve typing) and
|
||||
// zero debounce for all others (so the UI can react immediately).
|
||||
return parameter.form_type === "input" ||
|
||||
parameter.form_type === "textarea"
|
||||
? 500
|
||||
: 0;
|
||||
},
|
||||
);
|
||||
|
||||
const handleChange = async (
|
||||
|
||||
Reference in New Issue
Block a user