Skip to content

Commit 7a0b396

Browse files
committed
fix: ensure form inputs have stable ids
1 parent 9f5c1d9 commit 7a0b396

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/algora_web/components/core_components.ex

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -733,7 +733,7 @@ defmodule AlgoraWeb.CoreComponents do
733733
end
734734

735735
assigns
736-
|> assign(field: nil, id: "#{assigns.id || field.id}-#{Algora.Util.random_string()}")
736+
|> assign(field: nil, id: assigns.id || field.id)
737737
|> assign(:errors, Enum.map(errors, &translate_error(&1)))
738738
|> assign_new(:name, fn -> if assigns.multiple, do: field.name <> "[]", else: field.name end)
739739
|> assign_new(:value, fn -> value end)

0 commit comments

Comments
 (0)