Skip to content

Commit

Permalink
Fix formatting of generated core_components.ex
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazler committed Oct 3, 2023
1 parent 2c7fa8e commit 41556de
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 3 additions & 1 deletion installer/templates/phx_web/components/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ defmodule <%= @web_namespace %>.CoreComponents do

def input(%{type: "checkbox"} = assigns) do
assigns =
assign_new(assigns, :checked, fn -> Phoenix.HTML.Form.normalize_value("checkbox", assigns[:value]) end)
assign_new(assigns, :checked, fn ->
Phoenix.HTML.Form.normalize_value("checkbox", assigns[:value])
end)

~H"""
<div phx-feedback-for={@name}>
Expand Down
4 changes: 3 additions & 1 deletion priv/templates/phx.gen.live/core_components.ex
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,9 @@ defmodule <%= @web_namespace %>.CoreComponents do

def input(%{type: "checkbox"} = assigns) do
assigns =
assign_new(assigns, :checked, fn -> Phoenix.HTML.Form.normalize_value("checkbox", assigns[:value]) end)
assign_new(assigns, :checked, fn ->
Phoenix.HTML.Form.normalize_value("checkbox", assigns[:value])
end)

~H"""
<div phx-feedback-for={@name}>
Expand Down

0 comments on commit 41556de

Please sign in to comment.