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
Thanks for a quick fix, but still having a problem here:
if items collection is changed or a filter is applied, then data-role isn't working.
Can you take a look on this? Thanks, again.
The problem is, that the group headers should not be filtered at all. A possible solution is to use a custom filter, e.g.:
app.filter('myFilter', function () {
return function (items, query) {
var filtered = [];
var re = new RegExp(query, 'i');
for (var i = 0; i < items.length; i++) {
var item = items[i];
if (item.isGroupHeader || re.test(item.name)) {
filtered.push(item);
}
}
return filtered;
};
})
Agree with you. Group headers should not be filtered. But using a custom filter may cause to have multiple group headers in a row. And what about a situation when some new items are pushed to the mobiscroll-data or when the entire collection is replaced or changed?
Thanks!
The following code does not work:
The expression evaluates only after mobiscroll is initialized, so even though the data-role will be correct, it has no effect.
The text was updated successfully, but these errors were encountered: