Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复 datepicker 切换月份失效问题 #2531

Merged
merged 1 commit into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 18 additions & 9 deletions src/date-picker/panel/PanelContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,20 +62,29 @@ export default function PanelContent(props: PanelContentProps) {

const defaultTime = '00:00:00';

const onMonthChangeInner = useCallback((val: number) => {
onMonthChange?.(val, { partial });
const onMonthChangeInner = useCallback(
(val: number) => {
onMonthChange?.(val, { partial });
},
// eslint-disable-next-line
}, []);
[partial],
);

const onYearChangeInner = useCallback((val: number) => {
onYearChange?.(val, { partial });
const onYearChangeInner = useCallback(
(val: number) => {
onYearChange?.(val, { partial });
},
// eslint-disable-next-line
}, []);
[partial],
);

const onJumperClickInner = useCallback(({ trigger }) => {
onJumperClick?.({ trigger, partial });
const onJumperClickInner = useCallback(
({ trigger }) => {
onJumperClick?.({ trigger, partial });
},
// eslint-disable-next-line
}, []);
[partial],
);

return (
<div className={`${panelName}-content`}>
Expand Down
Loading