From 5ec3416725d256bb94832c6856cdbf09c4f42332 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Wed, 15 May 2024 10:01:20 -0400 Subject: [PATCH 1/2] fix(selectize): Accept jsonifiable values in `options` dictionary --- shiny/ui/_input_select.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/shiny/ui/_input_select.py b/shiny/ui/_input_select.py index 873977464..f4e2ed7fb 100644 --- a/shiny/ui/_input_select.py +++ b/shiny/ui/_input_select.py @@ -2,6 +2,8 @@ from __future__ import annotations +from shiny.types import Jsonifiable + __all__ = ( "input_select", "input_selectize", @@ -57,7 +59,7 @@ def input_selectize( multiple: bool = False, width: Optional[str] = None, remove_button: Optional[bool] = None, - options: Optional[dict[str, str | float | JSEval]] = None, + options: Optional[dict[str, Jsonifiable | JSEval]] = None, ) -> Tag: """ Create a select list that can be used to choose a single or multiple items from a @@ -137,7 +139,7 @@ def input_select( width: Optional[str] = None, size: Optional[str] = None, remove_button: Optional[bool] = None, - options: Optional[dict[str, str | float | JSEval]] = None, + options: Optional[dict[str, Jsonifiable | JSEval]] = None, ) -> Tag: """ Create a select list that can be used to choose a single or multiple items from a From a235d9a1f818f4e44e7c47ffc0838140b3bc1485 Mon Sep 17 00:00:00 2001 From: Garrick Aden-Buie Date: Wed, 15 May 2024 11:08:44 -0400 Subject: [PATCH 2/2] Fix import Co-authored-by: Winston Chang --- shiny/ui/_input_select.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shiny/ui/_input_select.py b/shiny/ui/_input_select.py index f4e2ed7fb..2bb5c872b 100644 --- a/shiny/ui/_input_select.py +++ b/shiny/ui/_input_select.py @@ -2,7 +2,7 @@ from __future__ import annotations -from shiny.types import Jsonifiable +from ..types import Jsonifiable __all__ = ( "input_select",