From f29f671bf9f28d8dc459e74b889492fe5c1b7eff Mon Sep 17 00:00:00 2001 From: nedhgx Date: Tue, 12 Nov 2024 11:32:45 -0800 Subject: [PATCH 1/4] =?UTF-8?q?Add=20=E2=80=98rows'=20attribute=20to=20the?= =?UTF-8?q?=20textarea,=20with=20a=20default=20value=20of=203=20rows.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- demo/lib/demo_web/live/post_live.ex | 1 + lib/backpex/fields/textarea.ex | 1 + 2 files changed, 2 insertions(+) diff --git a/demo/lib/demo_web/live/post_live.ex b/demo/lib/demo_web/live/post_live.ex index 5aa84ecf..4662935e 100644 --- a/demo/lib/demo_web/live/post_live.ex +++ b/demo/lib/demo_web/live/post_live.ex @@ -111,6 +111,7 @@ defmodule DemoWeb.PostLive do body: %{ module: Backpex.Fields.Textarea, label: "Body", + rows: 10, except: [:index] }, published: %{ diff --git a/lib/backpex/fields/textarea.ex b/lib/backpex/fields/textarea.ex index a0c8cebf..81300e56 100644 --- a/lib/backpex/fields/textarea.ex +++ b/lib/backpex/fields/textarea.ex @@ -34,6 +34,7 @@ defmodule Backpex.Fields.Textarea do Date: Tue, 12 Nov 2024 16:49:15 -0800 Subject: [PATCH 2/4] Update textarea.ex Co-authored-by: Florian Arens <60519307+Flo0807@users.noreply.github.com> --- lib/backpex/fields/textarea.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backpex/fields/textarea.ex b/lib/backpex/fields/textarea.ex index 81300e56..ad06647c 100644 --- a/lib/backpex/fields/textarea.ex +++ b/lib/backpex/fields/textarea.ex @@ -34,7 +34,7 @@ defmodule Backpex.Fields.Textarea do Date: Tue, 12 Nov 2024 17:38:46 -0800 Subject: [PATCH 3/4] Change default rows from 3 to 2. --- lib/backpex/fields/textarea.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/backpex/fields/textarea.ex b/lib/backpex/fields/textarea.ex index 81300e56..ad06647c 100644 --- a/lib/backpex/fields/textarea.ex +++ b/lib/backpex/fields/textarea.ex @@ -34,7 +34,7 @@ defmodule Backpex.Fields.Textarea do Date: Wed, 13 Nov 2024 08:43:48 -0800 Subject: [PATCH 4/4] Add docs for rows in textarea field. --- lib/backpex/fields/textarea.ex | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/backpex/fields/textarea.ex b/lib/backpex/fields/textarea.ex index ad06647c..0f9fa077 100644 --- a/lib/backpex/fields/textarea.ex +++ b/lib/backpex/fields/textarea.ex @@ -4,6 +4,7 @@ defmodule Backpex.Fields.Textarea do ## Options + * `:rows` - Optional integer number of visible text lines for the control. If it is not specified, the default value is 2. * `:placeholder` - Optional placeholder value or function that receives the assigns. * `:debounce` - Optional integer timeout value (in milliseconds), "blur" or function that receives the assigns. * `:throttle` - Optional integer timeout value (in milliseconds) or function that receives the assigns.