From 06da23e8660f7841592070b1a372ace0750c2364 Mon Sep 17 00:00:00 2001 From: Anton Gilgur <4970083+agilgur5@users.noreply.github.com> Date: Wed, 26 Jun 2024 01:14:27 -0400 Subject: [PATCH] fix(ui): parameter descriptions shouldn't disappear on input (#13244) Signed-off-by: Anton Gilgur --- ui/src/app/shared/components/parameters-input.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ui/src/app/shared/components/parameters-input.tsx b/ui/src/app/shared/components/parameters-input.tsx index 4e76e786d9fa..895e68c45255 100644 --- a/ui/src/app/shared/components/parameters-input.tsx +++ b/ui/src/app/shared/components/parameters-input.tsx @@ -13,9 +13,8 @@ interface ParametersInputProps { export function ParametersInput(props: ParametersInputProps) { function onParameterChange(parameter: Parameter, value: string) { const newParameters: Parameter[] = props.parameters.map(p => ({ - name: p.name, - value: p.name === parameter.name ? value : Utils.getValueFromParameter(p), - enum: p.enum + ...p, + value: p.name === parameter.name ? value : Utils.getValueFromParameter(p) })); props.onChange(newParameters); }