We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6fe5989 commit ab735adCopy full SHA for ab735ad
src/shared/containers/timeline-wall/index.jsx
@@ -77,9 +77,11 @@ function TimelineWallContainer(props) {
77
}, [pendingApprovals]);
78
79
useEffect(() => {
80
- const target = document.getElementById(`${selectedFilterValue.year}-${selectedFilterValue.month}`);
+ const target = document.getElementById(`${selectedFilterValue.year}-${(selectedFilterValue.month + 1).toString().padStart(2, '0')}`);
81
if (target) {
82
- target.scrollIntoView({ behavior: 'smooth' }, true);
+ const yOffset = -10;
83
+ const coordinate = target.getBoundingClientRect().top + window.pageYOffset + yOffset;
84
+ window.scrollTo({ top: coordinate, behavior: 'smooth' });
85
} else {
86
window.scrollTo({ top: 0, behavior: 'smooth' });
87
}
0 commit comments