-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Create onUnmount
in UIPlugin
for plugins that require clean up
#3093
Conversation
Good point. I have now used inversion of control to let plugins define a Perhaps this should be documented and/or added to |
onClose
in dashboard when clicking "Cancel" to perform clean up
Yeah, good thinking! Is it similar to
|
We already have |
Yeah, that’s why I think if we have both |
unmount () {
if (this.isTargetDOMEl) {
this.el?.remove()
}
} For instance, in webcam it is used here: uninstall () {
this.stop()
this.unmount()
} that's why I created |
I guess we could just copy whatever is in the unMount when re-defining it, but someone might forget to 🤔 |
onClose
in dashboard when clicking "Cancel" to perform clean uponUnmount
in BasePlugin
for plugins that require clean up
I choose to create
|
Yeah, this actually does make sense, awesome! |
Should we update docs maybe https://uppy.io/docs/writing-plugins/? |
onUnmount
in BasePlugin
for plugins that require clean uponUnmount
in UIPlugin
for plugins that require clean up
* 'main' of https://github.com/transloadit/uppy: Changelog for 1.31.0 and patches Strictly type uppy events (#3085) Create `onUnmount` in `UIPlugin` for plugins that require clean up (#3093) Companion improve logging (#3103) Fix `editFile` locale usage (#3108)
Fixes #3092
onUnmount
inUIPlugin
for plugins that require clean upstop
to clean up when already recordingonMount
andonUnmount
fromBasePlugin
intoUIPlugin