First of all, thanks for this project! I've toyed with it for some time and it's a really nice component.
On to business.
I've seen in this answer you provided here that there is already a programmatic way to invoke methods to reset the component or telling it that some event has been triggered.
My proposal is to also provide a prop on the component itself whose purpose is to provide the same functionalities as those shown in the the linked comment.
where myState must be a string whose permitted values are: loaded${loadId}, complete, reset, error.\
The ${loadId} is used to allow multiple consecutive calls to loaded callbacks.
Inside the InfiniteLoading component, there will be a watcher on the prop:
Hi @PeachScript !
First of all, thanks for this project! I've toyed with it for some time and it's a really nice component.
On to business. I've seen in this answer you provided here that there is already a programmatic way to invoke methods to reset the component or telling it that some event has been triggered.
My proposal is to also provide a prop on the component itself whose purpose is to provide the same functionalities as those shown in the the linked comment.
For example:
where
myState
must be a string whose permitted values are:loaded${loadId}
,complete
,reset
,error
.\ The${loadId}
is used to allow multiple consecutive calls toloaded
callbacks.Inside the
InfiniteLoading
component, there will be a watcher on the prop:Tell me what you think about this proposal and keep up the good work.