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

Expose function to reset the state #59

Open
toniengelhardt opened this issue Mar 28, 2023 · 2 comments
Open

Expose function to reset the state #59

toniengelhardt opened this issue Mar 28, 2023 · 2 comments

Comments

@toniengelhardt
Copy link

Currently, once the complete event is fired, the list becomes stale and doesn't load more items, even if the list expands. The easy solution would be to either expose the state directly or a function setState(state: string) to call on the ref.

@oumoussa98
Copy link
Owner

updating the state after calling the complete function wouldn't do noting as the observer gets disconnected
you can use the identifier prop to get the desired behavior, whenever the identifier changes the observer gets started again and the infinite event would be triggered if the component is intersecting.

@toniengelhardt
Copy link
Author

updating the state after calling the complete function wouldn't do noting as the observer gets disconnected you can use the identifier prop to get the desired behavior, whenever the identifier changes the observer gets started again and the infinite event would be triggered if the component is intersecting.

Ah great, but would the state not also be reset?

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

No branches or pull requests

2 participants