Skip to content

Commit

Permalink
Fix #4579: 9.6.2 Calendar mask correct hook (#4785)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware authored Aug 17, 2023
1 parent e4d4407 commit 638e4ef
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 638e4ef

Please sign in to comment.