Skip to content

Commit 2f19319

Browse files
committed
try updating confirmed values in hyperparams
1 parent 912edfc commit 2f19319

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

apps/frontend/app/components/Parameter.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ const Parameter = ({ form, type, index, confirmedValues, setConfirmedValues, ...
1515
};
1616
const Component = remains[type];
1717

18-
const updateConfirmedValues = (index) => {
18+
const updateConfirmedValues = (index, newValues) => {
1919
//get values from form
2020
const values = form.values.hyperparameters[index].values;
21+
22+
//set the new values
23+
24+
form.replaceListItem(`hyperparameters[${index}].values`, newValues);
2125
//update confirmed values
2226
let updatedValues = confirmedValues?.map((item) =>
2327
item.index === index ? { ...item, values: values } : item

apps/frontend/app/components/flows/AddExperiment/stepComponents/ParamStep.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ export const ParamStep = ({ form, confirmedValues, setConfirmedValues, ...props
2828
form.insertListItem('hyperparameters', {
2929
name: '',
3030
default: '',
31-
...((type === 'stringlist') && { values: [] }),
31+
...((type === 'stringlist') && { values: [''] }),
3232
...((type === 'integer' || type === 'float') && {
3333
min: '',
3434
max: '',

0 commit comments

Comments
 (0)