vue3-infinite-loading icon indicating copy to clipboard operation
vue3-infinite-loading copied to clipboard

Expose function to reset the state

Open toniengelhardt opened this issue 2 years ago • 2 comments

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.

toniengelhardt avatar Mar 28 '23 17:03 toniengelhardt

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.

oumoussa98 avatar Mar 30 '23 10:03 oumoussa98

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?

toniengelhardt avatar Mar 31 '23 09:03 toniengelhardt