From 4bd7281b58770d378282769ae5e17b16faa9408c Mon Sep 17 00:00:00 2001 From: Andrew Huang Date: Tue, 26 Dec 2023 11:24:04 -0800 Subject: [PATCH 1/2] Add resizable param --- panel/widgets/input.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/panel/widgets/input.py b/panel/widgets/input.py index 05b58f35a4..d628a5f2ef 100644 --- a/panel/widgets/input.py +++ b/panel/widgets/input.py @@ -142,6 +142,10 @@ class TextAreaInput(TextInput): rows = param.Integer(default=2, doc=""" Number of rows in the text input field.""") + resizable = param.ObjectSelector(objects=["both", "width", "height", False], doc=""" + Whether the layout is interactively resizable, + and if so in which dimensions.""") + _widget_type: ClassVar[Type[Model]] = _bkTextAreaInput From c2f4b7aec03cc0f6ff54947669d6bad60b86685f Mon Sep 17 00:00:00 2001 From: Andrew Huang Date: Wed, 27 Dec 2023 10:14:32 -0800 Subject: [PATCH 2/2] Update docs --- examples/reference/widgets/TextAreaInput.ipynb | 1 + panel/widgets/input.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/reference/widgets/TextAreaInput.ipynb b/examples/reference/widgets/TextAreaInput.ipynb index b9a990b568..7371245083 100644 --- a/examples/reference/widgets/TextAreaInput.ipynb +++ b/examples/reference/widgets/TextAreaInput.ipynb @@ -39,6 +39,7 @@ "* **`name`** (str): The title of the widget\n", "* **`placeholder`** (str): A placeholder string displayed when no value is entered\n", "* **`rows`** (int, default=2): The number of rows in the text input field. \n", + "* **`resizable`** (boolean | str): Whether the layout is interactively resizable, and if so in which dimensions: `width`, `height`, or `both`.\n", "\n", "___" ] diff --git a/panel/widgets/input.py b/panel/widgets/input.py index d628a5f2ef..0096988a04 100644 --- a/panel/widgets/input.py +++ b/panel/widgets/input.py @@ -144,7 +144,7 @@ class TextAreaInput(TextInput): resizable = param.ObjectSelector(objects=["both", "width", "height", False], doc=""" Whether the layout is interactively resizable, - and if so in which dimensions.""") + and if so in which dimensions: `width`, `height`, or `both`.""") _widget_type: ClassVar[Type[Model]] = _bkTextAreaInput