New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Fixed auto scroll not working when configure provider button is … #5282
base: next
Are you sure you want to change the base?
Conversation
👷 Deploy request for dev-web-novu pending review.Visit the deploys page to approve it
|
…o-scroll-for-provider
setTimeout(() => { | ||
onTabChange(scrollTo?.toString()); | ||
}, 100); | ||
}, []); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there will be an ESLint warning about missing deps, please fix it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure @LetItRock ,Just added the dependency . Was just curios about why we are putting onTabChange function as deps , we are scrolling once we land to the page .After that any tab changes , the onTabChange function will trigger the scrolling .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's safe to put the onTabChange
here in the deps array, because it's memoized and won't change during the re-renders ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it 👍
✅ Deploy Preview for novu-design ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Fixes #5151
What change does this PR introduce?
This PR fixes auto scroll not working when we click on the configure providers button in Get Started Page
Why was this change needed?
Introduced a setTimeout to trigger the auto scroller correctly inside useEffect . Removed unnecessary element from dependency array of the useEffect.