Skip to content

Commit d267998

Browse files
committed
finnal tweaks
1 parent 52305fe commit d267998

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

client/packages/lowcoder-comps/src/comps/calendarComp/calendarComp.tsx

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,16 +312,11 @@ let CalendarBasicComp = (function () {
312312
};
313313
showModal(eventInfo, true);
314314
} else {
315-
if (onEventVal) {
316-
onEventVal.forEach((event:any) => {
317-
if (event.name === 'doubleClick') {
318-
props.onEvent('doubleClick')
319-
} else {
320-
showModal(editEvent.current as EventType, false);
321-
}
322-
});
315+
if (onEventVal && onEventVal.some((e: any) => e.name === 'doubleClick')) {
316+
// Check if 'doubleClick' is included in the array
317+
props.onEvent('doubleClick');
323318
} else {
324-
showModal(editEvent.current, false);
319+
showModal(editEvent.current as EventType, false);
325320
}
326321
}
327322
};

0 commit comments

Comments
 (0)