Skip to content

Commit

Permalink
Fix #4579: Calendar mask correct hook (#4582)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Jun 30, 2023
1 parent 2e600f9 commit 735bd30
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2490,7 +2490,7 @@ export const Calendar = React.memo(
}
});

useUpdateEffect(() => {
React.useEffect(() => {
let unbindMaskEvents = null;

if (props.mask) {
Expand All @@ -2510,7 +2510,8 @@ export const Calendar = React.memo(
return () => {
props.mask && unbindMaskEvents && unbindMaskEvents();
};
}, [props.mask]);
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [props.disabled, props.mask, props.readOnlyInput]);

useUpdateEffect(() => {
setCurrentView(props.view);
Expand Down

0 comments on commit 735bd30

Please sign in to comment.