Skip to content

Commit 2e3a15c

Browse files
authored
Merge pull request #869 from naymspace/feature/add-textarea-rows-readonly
Assign missing rows in readonly textarea field
2 parents fccb475 + e90fe74 commit 2e3a15c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/backpex/fields/textarea.ex

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ defmodule Backpex.Fields.Textarea do
5959
type="textarea"
6060
field={@form[@name]}
6161
placeholder={@field_options[:placeholder]}
62-
rows={@field_options[:rows] || 2}
62+
rows={@field_options[:rows]}
6363
translate_error_fun={Backpex.Field.translate_error_fun(@field_options, assigns)}
6464
phx-debounce={Backpex.Field.debounce(@field_options, assigns)}
6565
phx-throttle={Backpex.Field.throttle(@field_options, assigns)}
@@ -81,6 +81,7 @@ defmodule Backpex.Fields.Textarea do
8181
type="textarea"
8282
field={@form[@name]}
8383
placeholder={@field_options[:placeholder]}
84+
rows={@field_options[:rows]}
8485
translate_error_fun={Backpex.Field.translate_error_fun(@field_options, assigns)}
8586
phx-debounce={Backpex.Field.debounce(@field_options, assigns)}
8687
phx-throttle={Backpex.Field.throttle(@field_options, assigns)}

0 commit comments

Comments
 (0)