-
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. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
The option name is |
Beta Was this translation helpful? Give feedback.
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