Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resizable param to TextAreaInput #6126

Merged
merged 3 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -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: `width`, `height`, or `both`.""")

_widget_type: ClassVar[Type[Model]] = _bkTextAreaInput


Expand Down
Loading