You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am running into an issue which I can't explain. When the list reaches the end myLoader is called however the listview is not updated. When I tap on load more the listview is updated with new data and the data from the previous scroll trigger is also added. If I trigger the myloader manually(for example from a button somewhere else) it always works.
Notice the log output which will state which items are being added.
I am not using a collection here to simplify my example, however I have the same issue in my project which uses collections and sql queries.
It might be an SDK issue with listviews however I don't understand why it works fine if I trigger the myloader via button but not via scroll.
I have the following code:
index.js
var iter = 0;
var addpercall = 50;
$.index.open();
$.is.init($.list);
$.is.load();
function myLoader(e) {
console.log('load more start: ', iter);
var section = Ti.UI.createListSection();
var items = [];
for (var i = 0; i < addpercall; i++) {
iter++;
items.push({
properties: {
itemId: 1
},
template: 'listRow',
name: {
text: 'text ' + iter
}
}
);
}
section.setItems(items);
$.list.appendSection(section);
e.success();
console.log('load more end: ', iter);
}
I am running into an issue which I can't explain. When the list reaches the end myLoader is called however the listview is not updated. When I tap on load more the listview is updated with new data and the data from the previous scroll trigger is also added. If I trigger the myloader manually(for example from a button somewhere else) it always works.
Notice the log output which will state which items are being added.
I am not using a collection here to simplify my example, however I have the same issue in my project which uses collections and sql queries.
It might be an SDK issue with listviews however I don't understand why it works fine if I trigger the myloader via button but not via scroll.
I have the following code:
index.js
index.xml
This issue also causes me to run into "[ERROR] message = "attempt to insert section 4 but there are only 2 sections after the update";".
The text was updated successfully, but these errors were encountered: