Compare commits
1 Commits
0729c63c3a
...
4a5c09d819
Author | SHA1 | Date | |
---|---|---|---|
4a5c09d819 |
@ -3,10 +3,6 @@ defmodule MemexWeb.NoteLive.Index do
|
||||
alias Memex.{Notes, Notes.Note}
|
||||
|
||||
@impl true
|
||||
def mount(%{"search" => search}, _session, socket) do
|
||||
{:ok, socket |> assign(search: search) |> display_notes()}
|
||||
end
|
||||
|
||||
def mount(_params, _session, socket) do
|
||||
{:ok, socket |> assign(search: nil) |> display_notes()}
|
||||
end
|
||||
|
@ -11,7 +11,7 @@
|
||||
phx-debounce="500"
|
||||
class="self-stretch flex flex-col items-stretch"
|
||||
>
|
||||
<%= text_input(f, :search_term, class: "input input-primary", value: @search) %>
|
||||
<%= text_input(f, :search_term, class: "input input-primary") %>
|
||||
</.form>
|
||||
|
||||
<%= if @notes |> Enum.empty?() do %>
|
||||
|
Loading…
Reference in New Issue
Block a user