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

Keep element visible once it has been visible once #100

Open
jackfranklin opened this Issue Nov 3, 2017 · 2 comments

Comments

Projects
None yet
4 participants
@jackfranklin

jackfranklin commented Nov 3, 2017

Hello,

Firstly, thank you for this component, we've really enjoyed using it!

Often when using it we find we have to wrap the component and use onChange to store some local state to keep track of if the component has been visible once. This is so we keep the component on the page constantly once it's been seen by the user once (so if they are scrolling up/down a big list, things don't pop in and out).

This is pretty easily done by storing state and listening to onChange, but I was wondering if you'd consider a PR that added a keepVisibleOnceSeen prop that would do this out of the box. It would remove a small amount of boilerplate we have to have each time we use this component.

If you don't then that's totally cool, but if you think this is a reasonable addition I'd be happy to make the PR and do the work.

Thanks!

Jack

@nirpeled

This comment has been minimized.

Show comment
Hide comment
@nirpeled

nirpeled Nov 5, 2017

Sounds like a great feature to me! I think that you should issue a PR with the suggested code, it will be easier for everyone involved to comment and discuss over it once there is some code to talk about.

nirpeled commented Nov 5, 2017

Sounds like a great feature to me! I think that you should issue a PR with the suggested code, it will be easier for everyone involved to comment and discuss over it once there is some code to talk about.

@peduarte

This comment has been minimized.

Show comment
Hide comment
@peduarte

peduarte Dec 30, 2017

I'd fine this feature useful too as currently I'm keeping state just to toggle the active prop, same as Jack.

Loving this component btw! <3

peduarte commented Dec 30, 2017

I'd fine this feature useful too as currently I'm keeping state just to toggle the active prop, same as Jack.

Loving this component btw! <3

@joshwnj joshwnj added the enhancement label Jul 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment