This repository is used for customer feedback regarding Telerik UI for NativeScript. The issues system here is used by customers who want to submit their feature requests or vote for existing ones.
Other
115
stars
21
forks
source link
RadListView iOS: items are loaded twice (watching the itemLoading-event) #1299
When loading some data from the server and pushing the data to the DataSouce of the RadListView, the items seem to be loaded twice on iOS.
This is the bindingContext of the page:
items: new observableArrayModule.ObservableArray(),
loadData: function() {
var self = this;
return new Promise(function (resolve, reject) {
http.getJSON("https://restcountries.eu/rest/v2/all").then(function(response) {
self.get('items').splice(0);
self.get('items').push(response);
resolve();
}, function (e) {
console.log(e);
reject();
});
});
}
I trigger the itemLoading event of the RadListView this way:
exports.onItemLoading = function(args) {
console.log("itemLoadingEvent index " + args.index);
};
And this creates the following output on iOS:
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 0
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 1
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 2
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 3
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 4
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 5
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 6
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 7
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 8
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 9
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 10
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 11
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 12
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 13
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 14
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 15
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 0
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 1
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 2
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 3
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 4
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 5
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 6
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 7
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 8
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 9
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 10
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 11
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 12
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 13
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 14
CONSOLE LOG file:///app/main-page.js:33:0: itemLoadingEvent index 15
... so you see it is loading the items twice.
On Android, the output is as expected (items are loaded only once).
The same issue occurs when using pulltorefresh. You also can feel it on a physical device (e.g. iPhone 6) that the data needs more time to be actually displayed, compared to Android.
Which platform(s) does your issue occur on?
iOS
Please provide the following version numbers that your issue occurs with:
Progress NativeScript UI plugin version: 7.1.0
CLI: 6.1.2
Cross-platform modules: 6.1.2
Runtime(s): tns-ios 6.1.1, tns-android 6.1.2
Please tell us how to recreate the issue in as much detail as possible.
Start the application ..
...
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
Tell us about the problem
When loading some data from the server and pushing the data to the DataSouce of the RadListView, the items seem to be loaded twice on iOS.
This is the bindingContext of the page:
I trigger the itemLoading event of the RadListView this way:
And this creates the following output on iOS:
... so you see it is loading the items twice. On Android, the output is as expected (items are loaded only once).
The same issue occurs when using pulltorefresh. You also can feel it on a physical device (e.g. iPhone 6) that the data needs more time to be actually displayed, compared to Android.
Which platform(s) does your issue occur on?
iOS
Please provide the following version numbers that your issue occurs with:
Please tell us how to recreate the issue in as much detail as possible.
Is there code involved? If so, please share the minimal amount of code needed to recreate the problem.
RlvPullToRefreshIssueIOS.zip