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
By default, Flop.Phoenix puts all parameters into the query parameters when building URLs. This can overridden by passing a custom URL builder function since version 0.15, allowing you to map flop parameters to other URL structures (e.g. /categories/{category_id}/posts/{page}?s={search_term}). However, when you handle the parameters map in a controller function or in handle_params/3, you need convert those parameters back to the parameter format that Flop understands. Flop.nest_filters/3 and Flop.map_to_filter_params/2 can partially help with that, but it is still more effort than it should be. Also, you'll have to define both the URL builder and the URL parser function.
It would be great to have some way to define the URL mapping once in a concise format, and have Flop.Phoenix do the building/parsing for you.
The text was updated successfully, but these errors were encountered:
By default, Flop.Phoenix puts all parameters into the query parameters when building URLs. This can overridden by passing a custom URL builder function since version 0.15, allowing you to map flop parameters to other URL structures (e.g.
/categories/{category_id}/posts/{page}?s={search_term}
). However, when you handle the parameters map in a controller function or inhandle_params/3
, you need convert those parameters back to the parameter format that Flop understands.Flop.nest_filters/3
andFlop.map_to_filter_params/2
can partially help with that, but it is still more effort than it should be. Also, you'll have to define both the URL builder and the URL parser function.It would be great to have some way to define the URL mapping once in a concise format, and have Flop.Phoenix do the building/parsing for you.
The text was updated successfully, but these errors were encountered: