Skip to content

Commit

Permalink
Disable fallback checkbox in Core Components if FormField is disabled…
Browse files Browse the repository at this point in the history
… as well (#5830)
  • Loading branch information
PJUllrich authored Jun 12, 2024
1 parent b8c771d commit 8faa3ef
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion installer/templates/phx_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
~H"""
<div>
<label class="flex items-center gap-4 text-sm leading-6 text-zinc-600">
<input type="hidden" name={@name} value="false" />
<input type="hidden" name={@name} value="false" disabled={@rest[:disabled]} />
<input
type="checkbox"
id={@id}
Expand Down
2 changes: 1 addition & 1 deletion priv/templates/phx.gen.live/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ defmodule <%= @web_namespace %>.CoreComponents do
~H"""
<div>
<label class="flex items-center gap-4 text-sm leading-6 text-zinc-600">
<input type="hidden" name={@name} value="false" />
<input type="hidden" name={@name} value="false" disabled={@rest[:disabled]} />
<input
type="checkbox"
id={@id}
Expand Down

0 comments on commit 8faa3ef

Please sign in to comment.