-
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
@uppy/core: close->destroy, clearUploadedFiles->clear #5154
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Diff output filesdiff --git a/packages/@uppy/core/lib/Uppy.js b/packages/@uppy/core/lib/Uppy.js
index 8bbc84a..a8520b8 100644
--- a/packages/@uppy/core/lib/Uppy.js
+++ b/packages/@uppy/core/lib/Uppy.js
@@ -327,7 +327,7 @@ export class Uppy {
});
this.emit("reset-progress");
}
- clearUploadedFiles() {
+ clear() {
this.setState({
...defaultUploadState,
files: {},
@@ -855,7 +855,7 @@ export class Uppy {
};
this.setState(updatedState);
}
- close(_temp2) {
+ destroy(_temp2) {
let {
reason,
} = _temp2 === void 0 ? {} : _temp2;
diff --git a/packages/@uppy/dashboard/lib/Dashboard.js b/packages/@uppy/dashboard/lib/Dashboard.js
index 58dee86..32138b5 100644
--- a/packages/@uppy/dashboard/lib/Dashboard.js
+++ b/packages/@uppy/dashboard/lib/Dashboard.js
@@ -1074,7 +1074,7 @@ export default class Dashboard extends UIPlugin {
(_this$opts4$doneButto = (_this$opts4 = this.opts).doneButtonHandler) != null
? _this$opts4$doneButto
: _this$opts4.doneButtonHandler = () => {
- this.uppy.clearUploadedFiles();
+ this.uppy.clear();
this.requestCloseModal();
};
(_this$opts5$onRequest = (_this$opts5 = this.opts).onRequestCloseModal) != null |
aduh95
approved these changes
May 8, 2024
github-actions bot
added a commit
that referenced
this pull request
May 14, 2024
| Package | Version | Package | Version | | ---------------------- | ------------ | ---------------------- | ------------ | | @uppy/companion | 5.0.0-beta.6 | @uppy/status-bar | 4.0.0-beta.7 | | @uppy/companion-client | 4.0.0-beta.6 | @uppy/unsplash | 4.0.0-beta.6 | | @uppy/compressor | 2.0.0-beta.7 | @uppy/url | 4.0.0-beta.6 | | @uppy/core | 4.0.0-beta.7 | @uppy/utils | 6.0.0-beta.6 | | @uppy/dashboard | 4.0.0-beta.7 | @uppy/webcam | 4.0.0-beta.6 | | @uppy/dropbox | 4.0.0-beta.6 | @uppy/xhr-upload | 4.0.0-beta.4 | | @uppy/image-editor | 3.0.0-beta.4 | uppy | 4.0.0-beta.7 | | @uppy/screen-capture | 4.0.0-beta.5 | | | - @uppy/companion: switch from `node-redis` to `ioredis` (Dominik Schmidt / #4623) - meta: Fix headings in xhr.mdx (Merlijn Vos) - @uppy/xhr-upload: introduce hooks similar to tus (Merlijn Vos / #5094) - @uppy/core: close->destroy, clearUploadedFiles->clear (Merlijn Vos / #5154) - @uppy/companion-client,@uppy/dropbox,@uppy/screen-capture,@uppy/unsplash,@uppy/url,@uppy/webcam: Use `title` consistently from locales (Merlijn Vos / #5134) | Package | Version | Package | Version | | ------------------ | ------- | ------------------ | ------- | | @uppy/core | 3.11.3 | uppy | 3.25.3 | | @uppy/image-editor | 2.4.6 | | | - @uppy/image-editor: fix tooltips (Avneet Singh Malhotra / #5156) - meta: Remove redundant `plugins` prop from examples (Merlijn Vos / #5145) - @uppy/image-editor: Remove `target` option from examples and document consistently (Merlijn Vos / #5146) - @uppy/core: make getObjectOfFilesPerState more efficient (Merlijn Vos / #5155)
Murderlon
added a commit
that referenced
this pull request
May 21, 2024
* 4.x: (24 commits) @uppy/companion: encode `uploadId` (#5168) @uppy/companion: bump `express-session` (#5177) @uppy/companion: remove dependency on `express-request-id` (#5176) @uppy/companion: bump prom to v15 (#5175) docs: fix linter meta: remove `nodemon` from the deps (#5172) docs: update `@uppy/aws-s3` docs (#5093) meta: update more dependencies (#5171) @uppy/companion: upgrade deps (#5119) Release: uppy@4.0.0-beta.7 (#5162) @uppy/companion: switch from `node-redis` to `ioredis` (#4623) Fix headings in xhr.mdx @uppy/xhr-upload: introduce hooks similar to tus (#5094) @uppy/core: close->destroy, clearUploadedFiles->clear (#5154) Use `title` consistently from locales (#5134) Release: uppy@4.0.0-beta.6 (#5152) Release: uppy@4.0.0-beta.5 (#5141) meta: run Prettier in the release workflow Release: uppy@3.25.1 (#5139) Bump ejs from 3.1.9 to 3.1.10 (#5135) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Ref: #4764