Make rx.Upload
a memoization leaf (#2695)
This commit is contained in:
parent
278183b526
commit
f4666c4c96
@ -8,7 +8,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from reflex import constants
|
||||
from reflex.components.chakra.forms.input import Input
|
||||
from reflex.components.chakra.layout.box import Box
|
||||
from reflex.components.component import Component
|
||||
from reflex.components.component import Component, MemoizationLeaf
|
||||
from reflex.constants import Dirs
|
||||
from reflex.event import CallableEventSpec, EventChain, EventSpec, call_script
|
||||
from reflex.utils import imports
|
||||
@ -138,7 +138,7 @@ class UploadFilesProvider(Component):
|
||||
tag = "UploadFilesProvider"
|
||||
|
||||
|
||||
class Upload(Component):
|
||||
class Upload(MemoizationLeaf):
|
||||
"""A file upload component."""
|
||||
|
||||
library = "react-dropzone@14.2.3"
|
||||
|
@ -13,7 +13,7 @@ from typing import Any, ClassVar, Dict, List, Optional, Union
|
||||
from reflex import constants
|
||||
from reflex.components.chakra.forms.input import Input
|
||||
from reflex.components.chakra.layout.box import Box
|
||||
from reflex.components.component import Component
|
||||
from reflex.components.component import Component, MemoizationLeaf
|
||||
from reflex.constants import Dirs
|
||||
from reflex.event import CallableEventSpec, EventChain, EventSpec, call_script
|
||||
from reflex.utils import imports
|
||||
@ -114,7 +114,7 @@ class UploadFilesProvider(Component):
|
||||
"""
|
||||
...
|
||||
|
||||
class Upload(Component):
|
||||
class Upload(MemoizationLeaf):
|
||||
is_used: ClassVar[bool] = False
|
||||
|
||||
@overload
|
||||
|
Loading…
Reference in New Issue
Block a user