From 7ee8b51e3db3faac1e3cf3c57f26a6d763cd7ad7 Mon Sep 17 00:00:00 2001 From: Angelika Tyborska Date: Wed, 17 Jul 2024 13:15:44 +0200 Subject: [PATCH] Don't depend on Phoenix.HTML.Form.textarea --- lib/bitstyles_phoenix/component/form.ex | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/bitstyles_phoenix/component/form.ex b/lib/bitstyles_phoenix/component/form.ex index c903747..f6574bb 100644 --- a/lib/bitstyles_phoenix/component/form.ex +++ b/lib/bitstyles_phoenix/component/form.ex @@ -2,7 +2,6 @@ defmodule BitstylesPhoenix.Component.Form do use BitstylesPhoenix.Component import BitstylesPhoenix.Component.Error - alias Phoenix.HTML.Form, as: PhxForm @moduledoc """ Components for rendering input elements. @@ -503,7 +502,7 @@ defmodule BitstylesPhoenix.Component.Form do ) def ui_textarea(assigns) do - extra = assigns_to_attributes(assigns, @wrapper_assigns_keys) + extra = assigns_to_attributes(assigns, @wrapper_assigns_keys ++ [:type]) assigns = assigns @@ -512,7 +511,7 @@ defmodule BitstylesPhoenix.Component.Form do ~H""" <.ui_unwrapped_input {@wrapper}> - <%= PhxForm.textarea(@form, @field, @extra) %> + <%= render_input(:textarea, @form, @field, @extra) %> """ end @@ -900,7 +899,7 @@ defmodule BitstylesPhoenix.Component.Form do end def input(%{type: "textarea"} = assigns) do - extra = assigns_to_attributes(assigns, [:id, :name]) + extra = assigns_to_attributes(assigns, [:id, :name, :type, :value]) assigns = assign(assigns, extra: extra) ~H"""