Skip to content
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 header overlap scrolling #82

Merged
merged 1 commit into from
Jun 17, 2020
Merged

Conversation

jscheel
Copy link
Contributor

@jscheel jscheel commented Jun 15, 2020

No description provided.

@jscheel jscheel requested a review from assimovt June 15, 2020 03:19
@jscheel jscheel added bug Something isn't working patch Increment the patch version when merged release Create a release when this pr is merged labels Jun 15, 2020
Copy link

@assimovt assimovt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -172,6 +172,11 @@ export const Container = ({

const handleScroll = useCallback(() => {
if (!contentRef.current) return
const scrollableDistance =
contentRef.current.scrollHeight - contentRef.current.offsetHeight
if (scrollableDistance < 100) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: could extract into const

Copy link
Contributor Author

@jscheel jscheel Jun 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, it should come from the scrollRange, fixed

@jscheel jscheel force-pushed the fix-header-overlap-scrolling branch from 47445c4 to 850fb4b Compare June 17, 2020 05:11
@jscheel jscheel merged commit 2c308b3 into master Jun 17, 2020
@jscheel jscheel deleted the fix-header-overlap-scrolling branch June 17, 2020 05:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch Increment the patch version when merged release Create a release when this pr is merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants