When filter is defined for view.all, itemSkip and itemTake no longer optional
ronaldsuwandi opened this issue · 1 comments
ronaldsuwandi commented
If I define a filter for the view, I must specify itemSkip and itemTake - the following code works
items.view.all('viewname', function(selected, count) {
console.log(selected, count);
}, 0,0, function filter(item) {
return item.position === 'top';
});
However if I simply remove itemSkip and itemTake from the parameter, the filter is no longer executed and it will simply just show all elements in the view
items.view.all('viewname', function(selected, count) {
console.log(selected, count); // this will print everything
}, function filter(item) {
return item.position === 'top';
});
petersirka commented
Hi @ronaldsuwandi,
I fixed this problem. Please update your module and I will publish new version in few days. Download module code from GitHub, not from NPM.
If you will find a problem, please write me.
Thank you.