We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Show drag and drop based on condition not working

In solution below I tried to hide uploader component based on condition. 

https://stackblitz.com/edit/angular-fsda2b-svvbkj?file=app.component.html,app.component.css,app.component.ts
when I upload the file I hide  uploader  component and display Remove button so we restrict uploading a new file (user must remove file before upload other file) after removing new file and display uploader component the drag and drop feature not working.


1 Reply

UD UdhayaKumar Duraisamy Syncfusion Team November 24, 2022 08:28 AM

By setting the droparea in the created event of the uploader component instead of the ngAfterViewInit event, you can resolve the reported issue.


Documentation : https://ej2.syncfusion.com/angular/documentation/api/uploader/#created


Sample  : https://stackblitz.com/edit/angular-fsda2b-h2x4o2?file=app.component.html,app.component.css,app.component.ts


Loader.
Live Chat Icon For mobile
Up arrow icon