torch icon indicating copy to clipboard operation
torch copied to clipboard

UUID filter_view/3 with filter_string_input/3 not working

Open andreiva opened this issue 2 months ago • 1 comments

Big thanks to @kevinam99 for adding UUID support in #521. However when using filter_uuid/3 in combination with filter_string_input/3 it still defaults to :contains instead of :equals

Image Image

This is because, params = %{} when filter view is rendered the first time, so it defaults to :contains.

Introducing a new function in filter_view.ex that explicitly sets comparison to :equals, solves the issue. This would be a simple solution but I get the feeling it's just half the story.

  def filter_uuid_input(prefix, field, params) do
    prefix_str = to_string(prefix)
    {name, value} = find_param(params[prefix_str], field, :equals)
    text_input(prefix, String.to_atom(name), value: value)
  end```

andreiva avatar Dec 03 '25 06:12 andreiva

@andreiva Will you please take a stab at making these updates and submitting a Pull Request?

cpjolicoeur avatar Dec 03 '25 18:12 cpjolicoeur