Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rx.Upload a memoization leaf #2695

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions reflex/components/core/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
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
Expand Down Expand Up @@ -138,7 +138,7 @@ class UploadFilesProvider(Component):
tag = "UploadFilesProvider"


class Upload(Component):
class Upload(MemoizationLeaf):
"""A file upload component."""

library = "[email protected]"
Expand Down
4 changes: 2 additions & 2 deletions reflex/components/core/upload.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -114,7 +114,7 @@ class UploadFilesProvider(Component):
"""
...

class Upload(Component):
class Upload(MemoizationLeaf):
is_used: ClassVar[bool] = False

@overload
Expand Down
Loading