From a4b3c876aef2d39471d3627dd8478adb6840f494 Mon Sep 17 00:00:00 2001 From: Anantha Kumaran Date: Fri, 1 Dec 2023 10:47:41 +0530 Subject: [PATCH] don't toggle switches on websocket reconnect --- lib/exq_ui_web/live/busy_live/index.html.heex | 2 +- lib/exq_ui_web/live/recurring_live/index.html.heex | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/exq_ui_web/live/busy_live/index.html.heex b/lib/exq_ui_web/live/busy_live/index.html.heex index 1796028..bea5b9d 100644 --- a/lib/exq_ui_web/live/busy_live/index.html.heex +++ b/lib/exq_ui_web/live/busy_live/index.html.heex @@ -14,7 +14,7 @@
<%= node.identity %> - <%= form_for :signal, "#", [id: "node-#{node.identity}", phx_change: :signal, class: "mb-0 form-check form-switch form-check-inline"], fn f -> %> + <%= form_for :signal, "#", [id: "node-#{node.identity}", phx_auto_recover: :ignore, phx_change: :signal, class: "mb-0 form-check form-switch form-check-inline"], fn f -> %> <%= hidden_input(f, :name, value: "TSTP") %> <%= hidden_input(f, :node_id, value: node.identity) %> <%= checkbox(f, :quiet, diff --git a/lib/exq_ui_web/live/recurring_live/index.html.heex b/lib/exq_ui_web/live/recurring_live/index.html.heex index 58a069f..8e5dbcf 100644 --- a/lib/exq_ui_web/live/recurring_live/index.html.heex +++ b/lib/exq_ui_web/live/recurring_live/index.html.heex @@ -23,7 +23,7 @@ <%= for item <- @items do %> - <%= form_for :active, "#", [id: "schedule-#{item.schedule.name}", phx_change: :active, class: "mb-0 form-check form-switch form-check-inline", style: "margin: auto;display: flex;justify-content: center"], fn f -> %> + <%= form_for :active, "#", [id: "schedule-#{item.schedule.name}", phx_auto_recover: :ignore, phx_change: :active, class: "mb-0 form-check form-switch form-check-inline", style: "margin: auto;display: flex;justify-content: center"], fn f -> %> <%= hidden_input(f, :name, value: item.schedule.name) %> <%= hidden_input(f, :enabled, value: !item.schedule.schedule_opts.enabled) %> <%= checkbox(f, :toggle,