Open universal search modal instantly via client-side JS
Replace phx-click server event with Fluxon.open_dialog for zero-latency modal opening. The modal DOM is now always present (no :if conditional) so it can be shown instantly; the server syncs state in the background. Fix test selectors that now match the always-present modal form by scoping to forms without phx-target (which the modal form always has).
This commit is contained in:
@@ -140,7 +140,7 @@ defmodule MusicLibraryWeb.ScrobbleRulesLiveTest do
|
||||
{:ok, index_live, _html} = live(conn, ~p"/scrobble-rules")
|
||||
|
||||
index_live
|
||||
|> form("form[phx-change='search']", query: scrobble_rule.match_value)
|
||||
|> form("form[phx-change='search']:not([phx-target])", query: scrobble_rule.match_value)
|
||||
|> render_change()
|
||||
|
||||
assert_patch(index_live)
|
||||
|
||||
Reference in New Issue
Block a user