From 66c7ba957446b012b06d905a08912a9c1c67d4b9 Mon Sep 17 00:00:00 2001 From: Lei OT Date: Tue, 4 Jun 2024 15:15:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E6=A1=86:=20=E4=B8=8D?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E7=A9=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/SearchForm.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/SearchForm.jsx b/src/components/SearchForm.jsx index a539f72..c116dd8 100644 --- a/src/components/SearchForm.jsx +++ b/src/components/SearchForm.jsx @@ -27,7 +27,7 @@ const SearchForm = ({ initialValue, onSubmit, onReset, ...props }) => { const formValuesMapper = (values) => { const destinationObject = { - 'referenceNo': { key: 'referenceNo' }, + 'referenceNo': { key: 'referenceNo', transform: (value) => value || '' }, 'dates': [ { key: 'startdate', transform: (arrVal) => (arrVal ? arrVal[0].format(DATE_FORMAT) : '') }, { key: 'enddate', transform: (arrVal) => (arrVal ? arrVal[1].format(DATE_FORMAT) : '') }, @@ -45,7 +45,7 @@ const SearchForm = ({ initialValue, onSubmit, onReset, ...props }) => { } } // omit empty - Object.keys(dest).forEach((key) => (dest[key] == null || dest[key] === '' || dest[key].length === 0) && delete dest[key]); + // Object.keys(dest).forEach((key) => (dest[key] == null || dest[key] === '' || dest[key].length === 0) && delete dest[key]); return dest; };