From 2a45be6a4506c17618753258b632ea85f2e8efd9 Mon Sep 17 00:00:00 2001 From: Dave Richer Date: Wed, 21 Feb 2024 14:29:56 -0500 Subject: [PATCH] - fix on change set Field value issues Signed-off-by: Dave Richer --- .../report-center-modal-filters-sorters-component.jsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client/src/components/report-center-modal/report-center-modal-filters-sorters-component.jsx b/client/src/components/report-center-modal/report-center-modal-filters-sorters-component.jsx index d4e569934..7255d5c13 100644 --- a/client/src/components/report-center-modal/report-center-modal-filters-sorters-component.jsx +++ b/client/src/components/report-center-modal/report-center-modal-filters-sorters-component.jsx @@ -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 ( form.setFieldValue(fieldPath, parseInt(value, 10))}/> + onChange={(value) => form.setFieldValue(fieldPath, value)}/> ); } return ( form.setFieldsValue(fieldPath, e.target.value)}/> + onChange={(e) => form.setFieldValue(fieldPath, e.target.value)}/> ); })() }