fix: fieldMappingTime data error when clear inputvalue (#4906)

This commit is contained in:
huangxiaomin
2024-11-17 21:04:04 +08:00
committed by GitHub
parent 77083abcc5
commit 94c68c966e

View File

@@ -91,6 +91,11 @@ function handleRangeTimeValue(values: Record<string, any>) {
fieldMappingTime.forEach(
([field, [startTimeKey, endTimeKey], format = 'YYYY-MM-DD']) => {
if (startTimeKey && endTimeKey && values[field] === null) {
delete values[startTimeKey];
delete values[endTimeKey];
}
if (!values[field]) {
delete values[field];
return;