-
Couldn't load subscription status.
- Fork 115
Closed
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers
Description
Currently, ui.input_select() is a base function for ui.input_selectize().
This requires that ui.input_select() have extra arguments:
selectize:bool = False; Enablesselectize.jsremove_button: Optional[bool] = None; Adds remove button plugin forselectize.jsoptions: Optional[dict[str, Jsonifiable | JSEval]] = None; Options supplied toselectize.js
In addition, ui.input_select(choices=) has type support for HTML tags. While it currently doesn't throw an error, I believe a type error should be displayed.
Ex:
ui.input_select(
"basic_select2",
"Default select",
{
"a": "Choice A",
"b": ui.tags.div(ui.tags.strong("Choice B1"), ui.tags.strong("Choice B2")),
},
)This is displays as if the second choice has a value of " Choice B1AChoice B2 ", not the HTML tags that is represents.
Proposal:
- Move the current definition of
ui.input_select()toinput_select_impl(). Have bothui.input_select()andui.input_selectize()callinput_select_impl()directly. - Deprecate and eventually remove
selectize=,remove_button=, andoptions=frominput_select(). - Create separate typing for
input_select(choices=)where the eventual type definition of_Choices = Mapping[str, TagChild]becomesMapping[str, str]
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workinggood first issueGood for newcomersGood for newcomers