|
Hey, I noticed that you can set default ordering on schema level. For example: @derive {
Flop.Schema,
filterable: [:name, :description],
sortable: [:name, :description,],
default_order: %{
order_by: [:name],
order_directions: [:asc]
}
}but I did not find a way to set the default page size. Is there a way to set the default page size with flop? Currently, I use a workaround by defining the following line just before the params = Map.merge(%{"page_size" => 10}, user_params)The issue is that I now define default values across multiple modules. |
Answered by
woylie
Feb 3, 2025
Replies: 1 comment
|
The option name is |
0 replies
Answer selected by
Flo0807
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The option name is
default_limit. It is applied to all pagination types. You can set it in the schema or globally in the application environment. https://hexdocs.pm/flop/Flop.html#t:option/0-defaults