Skip to content

Commit

Permalink
fix:when props.visible changed also trigger alignOverlay
Browse files Browse the repository at this point in the history
  • Loading branch information
kl-nevermore committed Dec 12, 2023
1 parent d2037d5 commit db2dac8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2571,8 +2571,10 @@ export const Calendar = React.memo(
}, [props.view]);

useUpdateEffect(() => {
overlayVisibleState && alignOverlay();
}, [currentView, overlayVisibleState]);
if (overlayVisibleState || props.visible) {
alignOverlay();
}
}, [currentView, overlayVisibleState, props.visible]);

useUpdateEffect(() => {
if (!props.onViewDateChange && !viewStateChanged.current) {
Expand Down

0 comments on commit db2dac8

Please sign in to comment.