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

@uppy/vue: fix passing of props #5281

Merged
merged 1 commit into from
Jun 27, 2024
Merged

@uppy/vue: fix passing of props #5281

merged 1 commit into from
Jun 27, 2024

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Jun 27, 2024

We were not passing the right props (the Vue ones instead of the Uppy ones).

Copy link
Contributor

Diff output files
diff --git a/packages/@uppy/vue/lib/dashboard-modal.js b/packages/@uppy/vue/lib/dashboard-modal.js
index e651eaa..ff5a78b 100644
--- a/packages/@uppy/vue/lib/dashboard-modal.js
+++ b/packages/@uppy/vue/lib/dashboard-modal.js
@@ -20,7 +20,7 @@ export default defineComponent({
   setup(props) {
     const containerRef = ref();
     const pluginRef = ref();
-    const propsRef = ref(props);
+    const propsRef = ref(props.props);
     const onMount = () => {
       const {
         uppy,
@@ -28,7 +28,7 @@ export default defineComponent({
       const options = {
         id: "DashboardModal",
         inline: false,
-        ...props,
+        ...props.props,
         target: containerRef.value,
       };
       uppy.use(DashboardPlugin, options);
diff --git a/packages/@uppy/vue/lib/dashboard.js b/packages/@uppy/vue/lib/dashboard.js
index 4350afb..586d010 100644
--- a/packages/@uppy/vue/lib/dashboard.js
+++ b/packages/@uppy/vue/lib/dashboard.js
@@ -23,7 +23,7 @@ export default defineComponent({
       const options = {
         id: "Dashboard",
         inline: true,
-        ...props,
+        ...props.props,
         target: containerRef.value,
       };
       uppy.use(DashboardPlugin, options);
diff --git a/packages/@uppy/vue/lib/drag-drop.js b/packages/@uppy/vue/lib/drag-drop.js
index fe3b597..af4d91f 100644
--- a/packages/@uppy/vue/lib/drag-drop.js
+++ b/packages/@uppy/vue/lib/drag-drop.js
@@ -23,7 +23,7 @@ export default defineComponent({
       } = props;
       const options = {
         id: "DragDrop",
-        ...props,
+        ...props.props,
         target: containerRef.value,
       };
       uppy.use(DragDropPlugin, options);
diff --git a/packages/@uppy/vue/lib/file-input.js b/packages/@uppy/vue/lib/file-input.js
index 8c6657b..61f609c 100644
--- a/packages/@uppy/vue/lib/file-input.js
+++ b/packages/@uppy/vue/lib/file-input.js
@@ -23,7 +23,7 @@ export default defineComponent({
       } = props;
       const options = {
         id: "FileInput",
-        ...props,
+        ...props.props,
         target: containerRef.value,
       };
       uppy.use(FileInputPlugin, options);
diff --git a/packages/@uppy/vue/lib/progress-bar.js b/packages/@uppy/vue/lib/progress-bar.js
index b967075..63b2d9e 100644
--- a/packages/@uppy/vue/lib/progress-bar.js
+++ b/packages/@uppy/vue/lib/progress-bar.js
@@ -23,7 +23,7 @@ export default defineComponent({
       } = props;
       const options = {
         id: "ProgressBar",
-        ...props,
+        ...props.props,
         target: containerRef.value,
       };
       uppy.use(ProgressBarPlugin, options);
diff --git a/packages/@uppy/vue/lib/status-bar.js b/packages/@uppy/vue/lib/status-bar.js
index 6d4444d..7efb087 100644
--- a/packages/@uppy/vue/lib/status-bar.js
+++ b/packages/@uppy/vue/lib/status-bar.js
@@ -23,7 +23,7 @@ export default defineComponent({
       } = props;
       const options = {
         id: "StatusBar",
-        ...props,
+        ...props.props,
         target: containerRef.value,
       };
       uppy.use(StatusBarPlugin, options);

@aduh95 aduh95 merged commit f7f711f into 4.x Jun 27, 2024
17 checks passed
@aduh95 aduh95 deleted the fix-vue-on-4.x branch June 27, 2024 10:42
github-actions bot added a commit that referenced this pull request Jun 27, 2024
| Package                |       Version | Package                |       Version |
| ---------------------- | ------------- | ---------------------- | ------------- |
| @uppy/audio            |  2.0.0-beta.7 | @uppy/image-editor     |  3.0.0-beta.6 |
| @uppy/aws-s3           |  4.0.0-beta.8 | @uppy/instagram        |  4.0.0-beta.7 |
| @uppy/box              |  3.0.0-beta.8 | @uppy/onedrive         |  4.0.0-beta.8 |
| @uppy/companion        | 5.0.0-beta.11 | @uppy/provider-views   | 4.0.0-beta.10 |
| @uppy/companion-client |  4.0.0-beta.8 | @uppy/react            |  4.0.0-beta.8 |
| @uppy/core             | 4.0.0-beta.11 | @uppy/screen-capture   |  4.0.0-beta.6 |
| @uppy/dashboard        | 4.0.0-beta.11 | @uppy/transloadit      | 4.0.0-beta.10 |
| @uppy/drop-target      |  3.0.0-beta.6 | @uppy/unsplash         |  4.0.0-beta.8 |
| @uppy/dropbox          |  4.0.0-beta.9 | @uppy/url              |  4.0.0-beta.8 |
| @uppy/facebook         |  4.0.0-beta.7 | @uppy/utils            |  6.0.0-beta.9 |
| @uppy/file-input       |  4.0.0-beta.6 | @uppy/vue              |  2.0.0-beta.4 |
| @uppy/form             |  4.0.0-beta.5 | @uppy/webcam           |  4.0.0-beta.9 |
| @uppy/golden-retriever |  4.0.0-beta.6 | @uppy/xhr-upload       |  4.0.0-beta.7 |
| @uppy/google-drive     |  4.0.0-beta.1 | @uppy/zoom             |  3.0.0-beta.7 |
| @uppy/google-photos    |  0.2.0-beta.2 | uppy                   | 4.0.0-beta.13 |

- @uppy/companion: implement facebook app secret proof (Mikael Finstad / #5249)
- @uppy/provider-views: `Loader.tsx` - delete the file (Evgenia Karunus / #5284)
- @uppy/vue: fix passing of `props` (Antoine du Hamel / #5281)
- @uppy/google-photos: fix various issues (Mikael Finstad / #5275)
- @uppy/transloadit: fix strict type errors (Antoine du Hamel / #5271)
- @uppy/transloadit: simplify plugin to always run a single assembly (Merlijn Vos / #5158)
- meta: update Yarn version and npm deps (Antoine du Hamel / #5269)
- docs: prettier: 3.2.5 -> 3.3.2 (Antoine du Hamel / #5270)
- @uppy/provider-views: Provider views rewrite (.files, .folders => .partialTree) (Evgenia Karunus / #5050)
- @uppy/react: TS strict mode (Merlijn Vos / #5258)
- meta: simplify `build:ts` script (Antoine du Hamel / #5262)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant