feat(chat): debounce chat input validation

This commit is contained in:
João Paulo Dubas 2024-10-21 23:54:59 +00:00
parent af21885a46
commit 64016ef098
Signed by: joao.dubas
SSH Key Fingerprint: SHA256:V1mixgOGRc/YMhGx/DNkOSmJxgA2vHNrDZEk3wt/kOA

View File

@ -20,8 +20,8 @@ defmodule SlaxWeb.ChatRoomLive.Edit do
</:actions>
</.header>
<.simple_form for={@form} id="room-form" phx-change="validate-room" phx-submit="save-room">
<.input field={@form[:name]} type="text" label="Name" />
<.input field={@form[:topic]} type="text" label="Topic" />
<.input field={@form[:name]} type="text" label="Name" phx-debounce />
<.input field={@form[:topic]} type="text" label="Topic" phx-debounce />
<:actions>
<.button phx-disable-with="Saving..." class="w-full">Save</.button>
</:actions>