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
build_path/3 and to_query/2 don't include default parameters, but there is no easy way to remove the default parameters from an already existing parameter map. A remove_defaults or clean_params function might be a good addition.
Is the user-facing benefit of this change that unused filters wouldn't end up in the params? For example, I've noticed that all filter_fields end up in the params, regardless of whether they have a (pre-populated or user-selected) value.
Yes, that's the idea. The filter form is a just a regular HTML form, so it will generate parameters for each input, whether it is filled or not. We cannot change this on the component side, but we can clean the parameters up in the handle_event callback. Also, it is opt-in this way. It wouldn't work with dynamic forms.
build_path/3
andto_query/2
don't include default parameters, but there is no easy way to remove the default parameters from an already existing parameter map. Aremove_defaults
orclean_params
function might be a good addition.That would allow us to do something like:
The function should be able to take either a keyword list for the
for
and/orbackend
options or a meta struct from which it can get those options.The text was updated successfully, but these errors were encountered: