Replies: 1 comment 3 replies
-
|
Instead of trying to directly called the chained events, just return/yield the events directly from the backend and they will be queued on the frontend and sent after the upload handler completes. So change if on_upload_complete:
for callback in on_upload_complete:
if isinstance(callback, Callable):
await callback(files)to if on_upload_complete:
return on_upload_complete # or return self._on_upload_completeEvent handlers can return a single EventHandler or EventSpec or a sequence of EventHandler or EventSpec to chain them. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi there,
I've built a ComponentState (see below) that returns an rx.upload.
After files have uploaded, I want to call an rx.event (also passing the files to this event)
I've tried:
on_upload_completefunction as a normal function and an rx.eventon_upload_completefunction to a state var and calling it in thehandle_file_uploadfunctionon_changefor the rx.uploadIs this the right way to approach this?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions