From 11a38adffae6bd1ccc4fe22bb9be5c37a56ac2c7 Mon Sep 17 00:00:00 2001 From: Elijah Date: Fri, 18 Oct 2024 13:53:54 +0000 Subject: [PATCH] fix reflex-web test for select --- reflex/components/radix/themes/components/select.py | 7 +++---- reflex/components/radix/themes/components/select.pyi | 2 ++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/reflex/components/radix/themes/components/select.py b/reflex/components/radix/themes/components/select.py index de18881d8..47a1eaf3f 100644 --- a/reflex/components/radix/themes/components/select.py +++ b/reflex/components/radix/themes/components/select.py @@ -1,6 +1,6 @@ """Interactive components provided by @radix-ui/themes.""" -from typing import List, Literal +from typing import List, Literal, Union import reflex as rx from reflex.components.component import Component, ComponentNamespace @@ -180,17 +180,16 @@ class HighLevelSelect(SelectRoot): position: Var[Literal["item-aligned", "popper"]] @classmethod - def create(cls, **props) -> Component: + def create(cls, items: Union[List[str], Var[List[str]]], **props) -> Component: """Create a select component. Args: + items: The items of the select. **props: Additional properties to apply to the select component. Returns: The select component. """ - items = props.pop("items") - trigger_prop_list = [ "placeholder", "variant", diff --git a/reflex/components/radix/themes/components/select.pyi b/reflex/components/radix/themes/components/select.pyi index 62846782b..c43d58ada 100644 --- a/reflex/components/radix/themes/components/select.pyi +++ b/reflex/components/radix/themes/components/select.pyi @@ -701,6 +701,7 @@ class HighLevelSelect(SelectRoot): """Create a select component. Args: + items: The items of the select. items: The items of the select. placeholder: The placeholder of the select. label: The label of the select. @@ -874,6 +875,7 @@ class Select(ComponentNamespace): """Create a select component. Args: + items: The items of the select. items: The items of the select. placeholder: The placeholder of the select. label: The label of the select.