I'm using
tab_element.scrollIntoView({
behavior:'smooth',
block: 'center',
});
to scroll the element at the center
but immediately after this, I need to call router.navigate
This is causing the scroll to be interrupted,
so my solution is to do the navigation after the scrolling is finished.
Is there a way that I can get a promise or an observable which can be used to call a function after scroll completes?
I did not find solution so far š There is no native option to get any callback after scroll finishes.. you can only find solutions which hooks on scroll event like this one https://stackoverflow.com/a/51142522/861615
Maybe in few years: https://github.com/w3c/csswg-drafts/issues/3744 š¤·āāļø