-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Filtered length when paginating #11
Comments
Perhaps an extension to the paginated collection would be helpful here: |
Yep, would totally make sense in my world. For anyone else stopping by, I'll include the line you posted on Twitter, thanks :) "proxy._filtered.length" does the trick for now. |
Currently you can access the filtered collection within an obscura collection via var proxy = new Obscura(collection);
proxy.filterBy({ a: 2 });
proxy.setPerPage(10);
collection.length; // the original collection length
proxy.length; // the paginated length
proxy._filtered.length; // the filtered length Though I'd want an official API for this. Should be simple to add. |
@marcfalk This should be fixed now :)
|
Currently there is no way of knowing how many models are in the collection after filtering if you're also paginating. This is definitely information you may want to show in the UI.
The text was updated successfully, but these errors were encountered: