Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "1.1.1",
"version": "1.1.2",
"license": "MIT",
"main": "dist/index.js",
"description": "weekly calendar for antd",
Expand Down
4 changes: 3 additions & 1 deletion src/components/CalendarBody.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,9 @@ function Calendar<T extends GenericEvent>({
const rowRef = useRef<null | HTMLDivElement>(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]);

Expand Down Expand Up @@ -168,7 +170,7 @@ function Calendar<T extends GenericEvent>({
backgroundColor: 'white',
position: 'sticky',
boxShadow: 'rgba(0, 0, 0, 0.05) -1px 4px 4px ',
zIndex: 1,
zIndex: 2,
top: 0,
},
};
Expand Down