fix reflex-web test for select
This commit is contained in:
parent
07dfb48d8e
commit
11a38adffa
@ -1,6 +1,6 @@
|
|||||||
"""Interactive components provided by @radix-ui/themes."""
|
"""Interactive components provided by @radix-ui/themes."""
|
||||||
|
|
||||||
from typing import List, Literal
|
from typing import List, Literal, Union
|
||||||
|
|
||||||
import reflex as rx
|
import reflex as rx
|
||||||
from reflex.components.component import Component, ComponentNamespace
|
from reflex.components.component import Component, ComponentNamespace
|
||||||
@ -180,17 +180,16 @@ class HighLevelSelect(SelectRoot):
|
|||||||
position: Var[Literal["item-aligned", "popper"]]
|
position: Var[Literal["item-aligned", "popper"]]
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def create(cls, **props) -> Component:
|
def create(cls, items: Union[List[str], Var[List[str]]], **props) -> Component:
|
||||||
"""Create a select component.
|
"""Create a select component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
items: The items of the select.
|
||||||
**props: Additional properties to apply to the select component.
|
**props: Additional properties to apply to the select component.
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
The select component.
|
The select component.
|
||||||
"""
|
"""
|
||||||
items = props.pop("items")
|
|
||||||
|
|
||||||
trigger_prop_list = [
|
trigger_prop_list = [
|
||||||
"placeholder",
|
"placeholder",
|
||||||
"variant",
|
"variant",
|
||||||
|
@ -701,6 +701,7 @@ class HighLevelSelect(SelectRoot):
|
|||||||
"""Create a select component.
|
"""Create a select component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
items: The items of the select.
|
||||||
items: The items of the select.
|
items: The items of the select.
|
||||||
placeholder: The placeholder of the select.
|
placeholder: The placeholder of the select.
|
||||||
label: The label of the select.
|
label: The label of the select.
|
||||||
@ -874,6 +875,7 @@ class Select(ComponentNamespace):
|
|||||||
"""Create a select component.
|
"""Create a select component.
|
||||||
|
|
||||||
Args:
|
Args:
|
||||||
|
items: The items of the select.
|
||||||
items: The items of the select.
|
items: The items of the select.
|
||||||
placeholder: The placeholder of the select.
|
placeholder: The placeholder of the select.
|
||||||
label: The label of the select.
|
label: The label of the select.
|
||||||
|
Loading…
Reference in New Issue
Block a user