forked from hiway/freedive
Fix liliform callbacks
This commit is contained in:
parent
da68c1b631
commit
a103b10e10
1 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,8 @@
|
||||||
defmodule FreediveWeb.LiliformLive do
|
defmodule FreediveWeb.LiliformLive do
|
||||||
|
@callback items() :: map
|
||||||
|
@callback filters() :: [map]
|
||||||
|
@callback search(items :: map, query :: String.t()) :: map
|
||||||
|
|
||||||
defmacro __using__(opts) do
|
defmacro __using__(opts) do
|
||||||
quote location: :keep, bind_quoted: [opts: opts] do
|
quote location: :keep, bind_quoted: [opts: opts] do
|
||||||
use FreediveWeb, :live_view
|
use FreediveWeb, :live_view
|
||||||
|
@ -110,10 +114,6 @@ defmodule FreediveWeb.LiliformLive do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
@callback items() :: [map]
|
|
||||||
@callback filters() :: [map]
|
|
||||||
@callback search(items :: [map], query :: String.t()) :: [map]
|
|
||||||
|
|
||||||
def filter(items, key) do
|
def filter(items, key) do
|
||||||
case key do
|
case key do
|
||||||
:all ->
|
:all ->
|
||||||
|
|
Loading…
Reference in a new issue