Skip to content
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
2 changes: 1 addition & 1 deletion pyi_hashes.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"reflex/components/core/helmet.pyi": "43f8497c8fafe51e29dca1dd535d143a",
"reflex/components/core/html.pyi": "ea5919db8c8172913185977df900f36b",
"reflex/components/core/sticky.pyi": "a9b4492e423f1dd4ccbf270c8ea90157",
"reflex/components/core/upload.pyi": "c11465a3a88e3a374251dd1a16582938",
"reflex/components/core/upload.pyi": "360fb929edf960aca289a37d0433fc38",
"reflex/components/core/window_events.pyi": "76bf03a273a1fbbb3b333e10d5d08c30",
"reflex/components/datadisplay/__init__.pyi": "52755871369acbfd3a96b46b9a11d32e",
"reflex/components/datadisplay/code.pyi": "b86769987ef4d1cbdddb461be88539fd",
Expand Down
4 changes: 2 additions & 2 deletions reflex/components/core/upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
from reflex.utils.imports import ImportVar
from reflex.vars import VarData
from reflex.vars.base import Var, get_unique_variable_name
from reflex.vars.function import FunctionVar
from reflex.vars.sequence import LiteralStringVar

DEFAULT_UPLOAD_ID: str = "default"
Expand Down Expand Up @@ -111,8 +112,7 @@ def clear_selected_files(id_: str = DEFAULT_UPLOAD_ID) -> EventSpec:
# UploadFilesProvider assigns a special function to clear selected files
# into the shared global refs object to make it accessible outside a React
# component via `run_script` (otherwise backend could never clear files).
func = Var("__clear_selected_files")._as_ref()
return run_script(f"{func}({id_!r})")
return run_script(Var("__clear_selected_files")._as_ref().to(FunctionVar).call(id_))


def cancel_upload(upload_id: str) -> EventSpec:
Expand Down
Loading