diff --git a/lib/ash_phoenix/filter_form/filter_form.ex b/lib/ash_phoenix/filter_form/filter_form.ex index 69034a8..8f1c5f4 100644 --- a/lib/ash_phoenix/filter_form/filter_form.ex +++ b/lib/ash_phoenix/filter_form/filter_form.ex @@ -1212,8 +1212,8 @@ defmodule AshPhoenix.FilterForm do to_form(form, phoenix_form, :components, []) end - def input_value(_, _, field) do - raise "Invalid filter form field #{field}. Only :id, :negated, and :operator are supported" + def input_value(_, _, _field) do + nil end @impl true diff --git a/lib/ash_phoenix/filter_form/predicate.ex b/lib/ash_phoenix/filter_form/predicate.ex index 0cbb98b..7268324 100644 --- a/lib/ash_phoenix/filter_form/predicate.ex +++ b/lib/ash_phoenix/filter_form/predicate.ex @@ -111,8 +111,11 @@ defmodule AshPhoenix.FilterForm.Predicate do def input_value(%{negated?: negated?}, _, :negated), do: negated? def input_value(%{path: path}, _, :path), do: Enum.join(path, ".") - def input_value(_, _, field) do - raise "Invalid filter form field #{field}. Only :id, :negated, :operator, :field, :path, :value are supported" + def input_value(_, _, _field) do + nil + + # We can't raise here + # raise "Invalid filter form field #{field}. Only :id, :negated, :operator, :field, :path, :value are supported" end @impl true