Skip to content

Commit 0a31f29

Browse files
committed
Address review feedback
1 parent 4eee4ca commit 0a31f29

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

shiny/ui/_input_select.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ def _input_select_impl(
251251
selectize: bool = False,
252252
width: Optional[str] = None,
253253
size: Optional[str] = None,
254-
remove_button: Literal[True, False, "both", None] = None,
254+
remove_button: Optional[Literal[True, False, "both", None]] = None,
255255
options: Optional[dict[str, Jsonifiable | JSEval]] = None,
256256
) -> Tag:
257257
if options is not None and selectize is False:

shiny/ui/_input_update.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -743,7 +743,14 @@ def update_selectize(
743743
selected
744744
The values that should be initially selected, if any.
745745
remove_button
746-
Whether to show a remove button for the select input.
746+
Whether to include remove button(s). The following values are supported:
747+
748+
- `None` (the default): do nothing.
749+
- `True`: Adds the 'remove_button'/'clear_button' plugin (depending on `multiple`).
750+
- `False`: Previously added remove_button plugins are removed.
751+
- `"both"`: Both 'remove_button' and 'clear_button' plugins are added. This
752+
is useful for being able to clear each and all selected items when
753+
`multiple=True`.
747754
options
748755
Selectize.js options to customize the behavior of the select input.
749756
See <https://selectize.dev/docs/usage> for more details.

0 commit comments

Comments
 (0)