|
3 | 3 | from __future__ import annotations |
4 | 4 |
|
5 | 5 | from .._deprecated import warn_deprecated |
6 | | -from ..types import Jsonifiable |
| 6 | +from ..types import Jsonifiable, MISSING_TYPE, DEPRECATED |
7 | 7 |
|
8 | 8 | __all__ = ( |
9 | 9 | "input_select", |
@@ -138,11 +138,11 @@ def input_select( |
138 | 138 | *, |
139 | 139 | selected: Optional[str | list[str]] = None, |
140 | 140 | multiple: bool = False, |
141 | | - selectize: bool = False, |
| 141 | + selectize: bool | MISSING_TYPE = DEPRECATED, |
142 | 142 | width: Optional[str] = None, |
143 | 143 | size: Optional[str] = None, |
144 | | - remove_button: Optional[bool] = None, |
145 | | - options: Optional[dict[str, Jsonifiable | JSEval]] = None, |
| 144 | + remove_button: Optional[bool] | MISSING_TYPE = DEPRECATED, |
| 145 | + options: Optional[dict[str, Jsonifiable | JSEval]] | MISSING_TYPE = DEPRECATED, |
146 | 146 | ) -> Tag: |
147 | 147 | """ |
148 | 148 | Create a select list that can be used to choose a single or multiple items from a |
@@ -195,19 +195,25 @@ def input_select( |
195 | 195 | * :func:`~shiny.ui.input_radio_buttons` |
196 | 196 | * :func:`~shiny.ui.input_checkbox_group` |
197 | 197 | """ |
198 | | - if selectize: |
| 198 | + if isinstance(selectize, MISSING_TYPE): |
| 199 | + selectize = False |
| 200 | + else: |
199 | 201 | warn_deprecated( |
200 | 202 | "`selectize` parameter of `input_select()` is deprecated. " |
201 | 203 | "Use `input_selectize()` instead of passing `selectize=True`." |
202 | 204 | ) |
203 | 205 |
|
204 | | - if remove_button is not None: |
| 206 | + if isinstance(remove_button, MISSING_TYPE): |
| 207 | + remove_button = None |
| 208 | + else: |
205 | 209 | warn_deprecated( |
206 | 210 | "`remove_button` parameter of `input_select()` is deprecated. " |
207 | 211 | "Use `input_selectize()` instead." |
208 | 212 | ) |
209 | 213 |
|
210 | | - if options is not None: |
| 214 | + if isinstance(options, MISSING_TYPE): |
| 215 | + options = None |
| 216 | + else: |
211 | 217 | warn_deprecated( |
212 | 218 | "`options` parameter of `input_select()` is deprecated. " |
213 | 219 | "Use `input_selectize()` instead." |
|
0 commit comments