Preserve rule picker state across parent re-renders
This commit is contained in:
@@ -138,9 +138,9 @@ defmodule MusicLibraryWeb.ScrobbleRulePicker do
|
|||||||
{:ok,
|
{:ok,
|
||||||
socket
|
socket
|
||||||
|> assign(assigns)
|
|> assign(assigns)
|
||||||
|> assign(:query, "")
|
|> assign_new(:query, fn -> "" end)
|
||||||
|> assign(:collected_results, [])
|
|> assign_new(:collected_results, fn -> [] end)
|
||||||
|> assign(:wishlisted_results, [])}
|
|> assign_new(:wishlisted_results, fn -> [] end)}
|
||||||
end
|
end
|
||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
|
|||||||
Reference in New Issue
Block a user