From 08dad2efddab2f23c372672a785f3222a83b046c Mon Sep 17 00:00:00 2001 From: Florian Arens <60519307+Flo0807@users.noreply.github.com> Date: Fri, 8 Dec 2023 09:48:51 +0100 Subject: [PATCH] Add defoverridable for query function --- lib/backpex/filters/boolean.ex | 2 ++ lib/backpex/filters/multi_select.ex | 2 ++ lib/backpex/filters/range.ex | 2 ++ lib/backpex/filters/select.ex | 2 ++ 4 files changed, 8 insertions(+) diff --git a/lib/backpex/filters/boolean.ex b/lib/backpex/filters/boolean.ex index c15b29f5..9e615e17 100644 --- a/lib/backpex/filters/boolean.ex +++ b/lib/backpex/filters/boolean.ex @@ -127,6 +127,8 @@ defmodule Backpex.Filters.Boolean do Enum.map(options(), fn %{predicate: p, key: k} -> {k, p} end) |> Enum.into(%{}) end + + defoverridable query: 3 end end end diff --git a/lib/backpex/filters/multi_select.ex b/lib/backpex/filters/multi_select.ex index 2175b892..fc91fc6f 100644 --- a/lib/backpex/filters/multi_select.ex +++ b/lib/backpex/filters/multi_select.ex @@ -126,6 +126,8 @@ defmodule Backpex.Filters.MultiSelect do """ end + + defoverridable query: 3 end end end diff --git a/lib/backpex/filters/range.ex b/lib/backpex/filters/range.ex index 74b5410b..6b67be45 100644 --- a/lib/backpex/filters/range.ex +++ b/lib/backpex/filters/range.ex @@ -163,6 +163,8 @@ defmodule Backpex.Filters.Range do """ end + + defoverridable query: 3 end end end diff --git a/lib/backpex/filters/select.ex b/lib/backpex/filters/select.ex index f9c479c8..77c4315f 100644 --- a/lib/backpex/filters/select.ex +++ b/lib/backpex/filters/select.ex @@ -80,6 +80,8 @@ defmodule Backpex.Filters.Select do defp selected(""), do: nil defp selected(value), do: value + + defoverridable query: 3 end end end