From e9b57bb36dd4dd9fc15c273f0f3cdad0a99066a9 Mon Sep 17 00:00:00 2001 From: yoavweber Date: Mon, 25 Oct 2021 17:34:58 +0200 Subject: [PATCH 1/2] 1.1.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index b1cfcdb..20e1519 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "version": "1.1.1", + "version": "1.1.2", "license": "MIT", "main": "dist/index.js", "description": "weekly calendar for antd", From 525cf845989ecaf73248a9857477b685f51ffda6 Mon Sep 17 00:00:00 2001 From: yoavweber Date: Thu, 28 Oct 2021 12:20:56 +0200 Subject: [PATCH 2/2] bug: adjusting window scroll after scrolling the calendar --- src/components/CalendarBody.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/CalendarBody.tsx b/src/components/CalendarBody.tsx index 86d1557..8ca8053 100644 --- a/src/components/CalendarBody.tsx +++ b/src/components/CalendarBody.tsx @@ -72,7 +72,9 @@ function Calendar({ const rowRef = useRef(null); useEffect(() => { if (rowRef.current) { + // INFO: first scrolling both the calendar and the window, and then scrolling back the window rowRef.current?.scrollIntoView(); + window.scrollTo(0, 0); } }, [rowRef]); @@ -168,7 +170,7 @@ function Calendar({ backgroundColor: 'white', position: 'sticky', boxShadow: 'rgba(0, 0, 0, 0.05) -1px 4px 4px ', - zIndex: 1, + zIndex: 2, top: 0, }, };