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

added body props #52

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

added body props #52

wants to merge 6 commits into from

Conversation

Freysi21
Copy link

No description provided.

@coveralls
Copy link

coveralls commented Jul 21, 2019

Coverage Status

Coverage decreased (-3.5%) to 93.396% when pulling 93f58b9 on Freysi21:master into f4724fb on fkhadra:master.

@@ -157,6 +162,7 @@ export default class TrackVisibility extends PureComponent {

isComponentVisible = () => {
setTimeout(() => {
console.log("IS COMPONENT VISIBLE!?")
Copy link

Choose a reason for hiding this comment

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

There shouldn't be any console log in it.

}

removeListener() {
window.removeEventListener('scroll', this.throttleCb);
window.removeEventListener('resize', this.throttleCb);
this.props.body ? document.getElementById(this.props.body).removeEventListener('scroll', this.throttleCb) : window.removeEventListener('scroll', this.throttleCb);
Copy link

Choose a reason for hiding this comment

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

Exactly what I need as well. Nicely done!

@cilliand
Copy link

Exactly what I needed, thanks @Freysi21 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants