- fix on change set Field value issues
Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
@@ -133,7 +133,6 @@ function FiltersSection({filters, form, bodyshop}) {
|
||||
};
|
||||
|
||||
const reflections = reflector ? generateReflections(reflector) : [];
|
||||
|
||||
const fieldPath = [[field.name, "value"]];
|
||||
|
||||
if (reflections.length > 0) {
|
||||
@@ -142,7 +141,7 @@ function FiltersSection({filters, form, bodyshop}) {
|
||||
options={reflections}
|
||||
getPopupContainer={trigger => trigger.parentNode}
|
||||
onChange={(value) => {
|
||||
form.setFieldsValue({[fieldPath.join('.')]: value});
|
||||
form.setFieldValue(fieldPath, value);
|
||||
}}
|
||||
/>
|
||||
);
|
||||
@@ -151,13 +150,13 @@ function FiltersSection({filters, form, bodyshop}) {
|
||||
if (type === "number") {
|
||||
return (
|
||||
<InputNumber
|
||||
onChange={(value) => form.setFieldValue(fieldPath, parseInt(value, 10))}/>
|
||||
onChange={(value) => form.setFieldValue(fieldPath, value)}/>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<Input
|
||||
onChange={(e) => form.setFieldsValue(fieldPath, e.target.value)}/>
|
||||
onChange={(e) => form.setFieldValue(fieldPath, e.target.value)}/>
|
||||
);
|
||||
})()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user