Skip to content

Commit

Permalink
fix: fieldMappingTime data error when clear inputvalue (#4906)
Browse files Browse the repository at this point in the history
  • Loading branch information
DesignHhuang authored Nov 17, 2024
1 parent 77083ab commit 94c68c9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/@core/ui-kit/form-ui/src/components/form-actions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 94c68c9

Please sign in to comment.