Skip to content

Commit

Permalink
Fix primefaces#3153: update the current view on change (primefaces#3153)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zakir Nuriev committed Aug 11, 2022
1 parent e69effc commit a115320
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/lib/calendar/Calendar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2451,6 +2451,10 @@ export const Calendar = React.memo(React.forwardRef((props, ref) => {
}
});

useUpdateEffect(() => {
setCurrentView(props.view);
}, [props.view])

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

0 comments on commit a115320

Please sign in to comment.