fix: fieldMappingTime data error when clear inputvalue (#4906)
parent
77083abcc5
commit
94c68c966e
|
@ -91,6 +91,11 @@ function handleRangeTimeValue(values: Record<string, any>) {
|
||||||
|
|
||||||
fieldMappingTime.forEach(
|
fieldMappingTime.forEach(
|
||||||
([field, [startTimeKey, endTimeKey], format = 'YYYY-MM-DD']) => {
|
([field, [startTimeKey, endTimeKey], format = 'YYYY-MM-DD']) => {
|
||||||
|
if (startTimeKey && endTimeKey && values[field] === null) {
|
||||||
|
delete values[startTimeKey];
|
||||||
|
delete values[endTimeKey];
|
||||||
|
}
|
||||||
|
|
||||||
if (!values[field]) {
|
if (!values[field]) {
|
||||||
delete values[field];
|
delete values[field];
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in New Issue