Merge branch 'feature/scroll-into-view' into develop
This commit is contained in:
@@ -25,7 +25,7 @@ export const MonthCard:FC<MonthCardProps> = ({ yearMonth, children, monthlyExpen
|
||||
useEffect(() => {
|
||||
if(expanded && elRef.current) {
|
||||
// if the element i selected > scroll it into view
|
||||
elRef.current.scrollIntoView({ behavior: 'smooth', block: 'center' });
|
||||
elRef.current.scrollIntoView({ behavior: 'smooth', block: 'start' });
|
||||
}
|
||||
}, [expanded]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user