Skip to content

Commit

Permalink
Add resizable param to TextAreaInput (#6126)
Browse files Browse the repository at this point in the history
  • Loading branch information
ahuang11 authored and philippjfr committed Jan 17, 2024
1 parent fc680f9 commit 6dd6dfd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions examples/reference/widgets/TextAreaInput.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -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",
"___"
]
Expand Down
4 changes: 4 additions & 0 deletions panel/widgets/input.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,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: `width`, `height`, or `both`.""")

_widget_type: ClassVar[Type[Model]] = _bkTextAreaInput


Expand Down

0 comments on commit 6dd6dfd

Please sign in to comment.