You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add Flop.current_order/2 to retrieve the order of a given field.
Add Flop.to_next_page/2 and Flop.to_previous_page/1.
Add Flop.set_cursor/2, Flop.to_next_cursor/1 and Flop.to_previous_cursor/1.
Add Flop.set_offset/2, Flop.to_previous_offset/1, Flop.to_next_offset_2
and Flop.reset_cursors/2.
Add Flop.nest_filters/3 for converting filters between a key/value map and
a list of Flop.Filter parameters.
You can now set the default_pagination_type option, which forces a certain
set of parameters when defaults are applied and the pagination type cannot
be determined from the given parameters.
Add optional default argument to get_option.
Add pagination option. If set to true, pagination parameters are not cast.
Changed
Flop.map_to_filter_params/2 returns maps with string keys if the original
map has string keys now.
The has_previous_page? value of the Flop.Meta struct is now always true
if first is used with after. has_next_page? is always true when last is used with before.
push_order/2 resets the :after and :before parameters now, since the
cursors depend on the order.
validate_and_run/3 and validate_and_run!/3 pass all given options to
the validate functions now, allowing you to override defaults set in the
schema.
If the pagination_types option is used, parameters for other pagination
types will not be cast now instead of casting them and returning validation
errors.
Removed
Remove Flop.Cursor.get_cursor_from_map/2. Use Flop.Cursor.get_cursor_from_node/2 instead.