Nativescript-ui-feedback: RadListView loadMoreDataRequested fires only once

Created on 23 Aug 2017  路  5Comments  路  Source: ProgressNS/nativescript-ui-feedback

Please, provide the details below:

Did you verify this is a real problem by searching Stack Overflow?

I've done research, but haven't found anything regarding the issue.

Tell us about the problem

RadListView loadMoreDataRequested fires only once, after that it's never triggered.

Which platform(s) does your issue occur on?

iOS is affected, never tried on Android

Please provide the following version numbers that your issue occurs with:

nativescript cli 3.1.2
tns-ios: 3.1.0
nativescript-telerik-ui: 3.0.4

Please tell us how to recreate the issue in as much detail as possible.

I created a simple example demonstrating the issue.Please clone the repo at the following link, build and run on iOS (tns run ios):
https://github.com/terreb/radlisttest

Try to scroll down. You will notice that "load more" is triggered only once (see the console logs).

Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.

Yes, please see above.

All 5 comments

AFAIK you'll need to tell RadListView you're done loading items (with notifyLoadOnDemandFinished before it will fire again.

@EddyVerbruggen, thanks for the prompt reply. I tried that (updated the repo). Still doesn't work:(

@terreb I may have encountered something similar. Just wrap it in a timeout and you're golden:

export function loadMore(arg) {
    setTimeout(() => {
        vm.addNewItems()
        arg.object.notifyLoadOnDemandFinished()
    });
}

@EddyVerbruggen, awesome it works! And in my real app I don't need timeout since items are being fetched from the backend what means natural delay. Then the issue can be closed. Thank you a lot!

@terreb If you continue to experience such issue you can followup on this thread. Thanks @EddyVerbruggen that is exactly how this issue should be handled.

Closing this thread for now.

Was this page helpful?
0 / 5 - 0 ratings