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

How to trigger by ref's dom node $state.complete()

Open Hiram-Wong opened this issue 1 year ago • 5 comments

How to trigger by ref's dom node $state.complete()

Hiram-Wong avatar Mar 04 '23 13:03 Hiram-Wong

the $state object is only passed to the infinite event handler and it's not accessible by dom refs. If you can provide more info about your use case would be helpful.

oumoussa98 avatar Mar 30 '23 10:03 oumoussa98

the $state object is only passed to the infinite event handler and it's not accessible by dom refs. If you can provide more info about your use case would be helpful.

I need to request two api, one api interface is used to get the data, one api is to get the system configuration, the load function contains the api to get the data, get the system configuration I onmounted life cycle in vue, there are other functions to call the api parameters, I want to call the api when the parameters are empty when getting the system configuration api complete

Hiram-Wong avatar Mar 30 '23 12:03 Hiram-Wong

Same issue. I have a list that varies in length depending on the filter. I change the length of the list, but there is no reaction because i called $state.complete() before. The infinite event no longer works. There's no way to change the state from 'complete' to 'loading'.

shexm avatar Oct 25 '23 16:10 shexm

Same issue. I have a list that varies in length depending on the filter. I change the length of the list, but there is no reaction because i called $state.complete() before. The infinite event no longer works. There's no way to change the state from 'complete' to 'loading'.

You can use the parameter identifier,If you call $state.complete() this method, change the value of identifier again. image image image

Hiram-Wong avatar Oct 26 '23 11:10 Hiram-Wong

Thank you, bro! I have solved my problem. I should have been careful to read the document. You are very kind.

shexm avatar Oct 26 '23 19:10 shexm