elixirdrops / kerosene

Pagination for Ecto and Pheonix.
https://github.com/elixirdrops/kerosene
MIT License
231 stars 39 forks source link

Add support for per_page param #55

Open mdlkxzmcp opened 5 years ago

mdlkxzmcp commented 5 years ago

Having no way to control the per_page outside of the use Kerosene, per_page: 10 is a feature that I just couldn't live without. So here is the basic implementation of that.

This also brings back the PR #24, with a small twist – now to "disable" pagination via params just pass "per_page" => "all" (since that makes more sense than nil) :>

joshchernoff commented 4 years ago

So I'm getting the impression this lib maybe dead. I've started to try and bring some new life into it here

https://github.com/MorphicPro/dissolver

The two biggest features I've added to this thus far are custom theme modules and lazy queries.

In the case of lazy queries paginate returns an Ecto query rather than calling Repo.all

I've rebuilt a good part of the main lib but I'm still in the process of rewriting the specs for the Paginator since I don't want it to have so much open API.