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

Adding a prop that can contain a callback function that will receive isVisible #39

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

Conversation

blaineo
Copy link

@blaineo blaineo commented Dec 19, 2018

This will be helpful for setting state of parent components.

@blaineo
Copy link
Author

blaineo commented Feb 11, 2019

@fkhadra I'd love to have this functionality in your component. Is there any reason it can not be merged and released? If you don't plan on doing so, please let me know so that I can move forward with a fork. Many thanks.

@fkhadra
Copy link
Owner

fkhadra commented Feb 12, 2019

Hello @blaineo,

Sorry for the late reply. Since the end of december I'm preparing my move so I'm quite busy. It will be done at the end of the month. I'll try to review your PR asap even this weekend if I can.

@liao-frank liao-frank mentioned this pull request Feb 18, 2019
@liao-frank
Copy link

liao-frank commented Feb 18, 2019

It might be useful for the callback to receive some more data and be able to extrapolate which side[s] of the screen the component is off-screen of.

@blaineo
Copy link
Author

blaineo commented Feb 20, 2019

@liao-frank I think in the sprit of reducing complexity and keeping the component abstract, that kind of functionality would be handled in the referenced callback.

@liao-frank
Copy link

My thought process was that, in order to implement the functionality that I suggested, someone would have to re-implement the getBoundingClientRect and ref logic. When instead, at least the rect could be passed back for the dev to work with and perform any of their own functionality.

But perhaps this suggestion is a larger design choice that needs to be approved. I should probably first suggest to have the rect passed to the child render function.

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.

None yet

3 participants