Skip to content

Commit b7b7a83

Browse files
claraniWadjetz
authored andcommitted
fixup! front: editor-slopes-fix-form-validation
1 parent d2f6633 commit b7b7a83

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

front/src/applications/editor/components/LinearMetadata/FormComponent.tsx

+7
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,13 @@ export const FormComponent: React.FC<FieldProps> = (props) => {
173173
// case when you click on the already selected item => reset
174174
setSelected((old) => ((old ?? -1) === index ? null : index));
175175
setHovered(null);
176+
if (valueField && isNil(_item[valueField]) && isNil(selected)) {
177+
fixedData[index] = {
178+
..._item,
179+
[valueField]: 0,
180+
}
181+
onChange(fixedData)
182+
}
176183
}
177184
setClickPrevent(false);
178185
}, 150) as number;

0 commit comments

Comments
 (0)