Skip to content

Commit da5bd9f

Browse files
committed
fix: 🐛 解决依赖错误导致无限更新的问题!
1 parent f3dc2b5 commit da5bd9f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/DateTimePicker.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,8 @@ const DateTimePicker: React.FC<
206206
type: CalendarActionKind.CHANGE_CURRENT_DATE,
207207
payload: currentDate,
208208
});
209-
}, [mode, date, startDate, endDate, dates, minDate, timePicker, currentDate]);
209+
// eslint-disable-next-line react-hooks/exhaustive-deps
210+
}, [mode, date, startDate, endDate, dates, minDate, timePicker]);
210211

211212
const setCalendarView = useCallback((view: CalendarViews) => {
212213
dispatch({ type: CalendarActionKind.SET_CALENDAR_VIEW, payload: view });

0 commit comments

Comments
 (0)