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

Not able to use Uppy dashboard in Angular 18 #5481

Open
2 tasks done
anuj9196 opened this issue Oct 1, 2024 · 3 comments
Open
2 tasks done

Not able to use Uppy dashboard in Angular 18 #5481

anuj9196 opened this issue Oct 1, 2024 · 3 comments
Labels

Comments

@anuj9196
Copy link

anuj9196 commented Oct 1, 2024

Initial checklist

  • I understand this is a bug report and questions should be posted in the Community Forum
  • I searched issues and couldn’t find anything (or linked relevant results below)

Link to runnable example

No response

Steps to reproduce

I installed the following packages in Angular 18 application

"@uppy/angular": "^0.7.0",
"@uppy/core": "^4.2.1",
"@uppy/dashboard": "^4.1.0",

Followed the following instructions to setup in Angular https://uppy.io/docs/angular/

Added this code in the component.html file

<uppy-dashboard [uppy]="uppy"> </uppy-dashboard>

and component.ts file as

import {Component} from '@angular/core';
import {UppyAngularDashboardModule} from "@uppy/angular";
import {Uppy} from "@uppy/core";

@Component({
  selector: 'app-file-upload',
  standalone: true,
  imports: [
    UppyAngularDashboardModule
  ],
  templateUrl: './file-upload.component.html',
  styleUrls: [
    './file-upload.component.scss',
  ],
})
export class FileUploadComponent {
  uppy: Uppy = new Uppy({
    debug: true, autoProceed: true, animateOpenClose: false
  });
}

However the animateOpenClose is giving an error as

Screenshot 2024-10-01 at 9 52 29 AM

Also, the HTML show the following error

Screenshot 2024-10-01 at 9 53 13 AM

Expected behavior

The code should be working as given in the doc. Or the doc should be updated with clear instructions.

Actual behavior

I am getting error in declaring options for the uppy-dashboard component.

@anuj9196 anuj9196 added the Bug label Oct 1, 2024
@Murderlon
Copy link
Member

Hi, you are assigning animateOpenClose to @uppy/core but that does not exist. It's a prop on <dashboard>. Does it work then?

@alexfrench
Copy link

alexfrench commented Oct 9, 2024

Hi.

I'm also getting similar errors with Node 18.
For example:
Object literal may only specify known properties, and 'closeModalOnClickOutside' does not exist in type 'DashboardMiscOptions
Object literal may only specify known properties, and 'closeAfterFinish' does not exist in type 'DashboardMiscOptions

In fact all of these properties give me the same error

closeModalOnClickOutside: false,
closeAfterFinish: false,
disablePageScrollWhenModalOpen: true,
animateOpenClose: true,
browserBackButtonClose: false,
autoOpenFileEditor: false,

"@uppy/core": "^4.2.1",
"@uppy/dashboard": "^4.1.0",

Thanks.

@Murderlon
Copy link
Member

Hi, do you have a reproducible example in StackBlitz?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants