hacky workaround to allow __class_getitem__ with pydantic
This commit is contained in:
parent
1abc57c68b
commit
4d497e0053
@ -6,9 +6,12 @@ from reflex.components.chakra import ChakraComponent
|
||||
from reflex.components.component import Component
|
||||
from reflex.components.core.foreach import Foreach
|
||||
from reflex.vars import Var
|
||||
from typing import TypeVar, Generic
|
||||
|
||||
T = TypeVar("T")
|
||||
|
||||
class List(ChakraComponent):
|
||||
# TODO: Generic is just a hacky workaround to stop pydantic from complaining
|
||||
class List(ChakraComponent, Generic[T]):
|
||||
"""Display a list of items."""
|
||||
|
||||
tag = "List"
|
||||
|
Loading…
Reference in New Issue
Block a user