|
21 | 21 | from ._html_deps_external import selectize_deps
|
22 | 22 | from ._utils import JSEval, extract_js_keys, shiny_input_label
|
23 | 23 |
|
24 |
| -_Choices = Mapping[str, TagChild] |
| 24 | +_Choices = Mapping[str, str] |
25 | 25 | _OptGrpChoices = Mapping[str, _Choices]
|
26 | 26 |
|
27 | 27 | # Canonical format for representing select options.
|
@@ -75,8 +75,7 @@ def input_selectize(
|
75 | 75 | choices
|
76 | 76 | Either a list of choices or a dictionary mapping choice values to labels. Note
|
77 | 77 | that if a dictionary is provided, the keys are used as the (input) values and
|
78 |
| - the values are labels displayed to the user. It is not recommended to use |
79 |
| - anything other than a string for these labels. A dictionary of dictionaries is |
| 78 | + the values are labels displayed to the user. A dictionary of dictionaries is |
80 | 79 | also supported, and in that case, the top-level keys are treated as
|
81 | 80 | ``<optgroup>`` labels.
|
82 | 81 | selected
|
@@ -157,8 +156,7 @@ def input_select(
|
157 | 156 | choices
|
158 | 157 | Either a list of choices or a dictionary mapping choice values to labels. Note
|
159 | 158 | that if a dictionary is provided, the keys are used as the (input) values and
|
160 |
| - the values are labels displayed to the user. It is not recommended to use |
161 |
| - anything other than a string for these labels. A dictionary of dictionaries is |
| 159 | + the values are labels displayed to the user. A dictionary of dictionaries is |
162 | 160 | also supported, and in that case, the top-level keys are treated as
|
163 | 161 | ``<optgroup>`` labels.
|
164 | 162 | selected
|
@@ -259,12 +257,6 @@ def _input_select_impl(
|
259 | 257 |
|
260 | 258 | choices_ = _normalize_choices(choices)
|
261 | 259 |
|
262 |
| - if _contains_html(choices_): |
263 |
| - warn_deprecated( |
264 |
| - "Passing anything other than a string to `choices` parameter of " |
265 |
| - "`input_select()` and `input_selectize()` is deprecated." |
266 |
| - ) |
267 |
| - |
268 | 260 | selected = restore_input(resolved_id, selected)
|
269 | 261 | if selected is None and not multiple:
|
270 | 262 | selected = _find_first_option(choices_)
|
|
0 commit comments