This is a migrated thread and some comments may be shown as answers.

uploaddropzone visually not disabled if upload component is disabled

1 Answer 172 Views
Upload
This is a migrated thread and some comments may be shown as answers.
Arthur Helmel
Top achievements
Rank 1
Arthur Helmel asked on 20 Jul 2020, 10:40 AM

I have a kendo-upload component which is disabled in certain cases.

I have a kendo-uploaddropzone component which is visually not disabled when the kendo-upload component is disabled.

The user can not upload a file by dropping it into the dropzone while the upload component is disabled, so functionally it works perfectly.

I would expect that when the upload component is disabled the uploaddropzone is also disabled visually, so it has similar opacity like the upload component, and the icon color is not changed to primary color when user tries to drop a file.

Maybe also a specific cursor can be shown, so the user sees that the uploaddropzone is disabled when he tries to drop a file.

I did create a Stackblitz to demonstrate the issue:
https://stackblitz.com/edit/angular-qo8pns

 

Is there a possibility to set the uploaddropzone disabled manually? I did not found anything in the uploaddropzone component's documentation.

Personally I would prefer the behaviour I described at the top.

1 Answer, 1 is accepted

Sort by
0
Accepted
Preslava
Telerik team
answered on 21 Jul 2020, 08:49 AM

Hello Arthur Helmel,

Тo achieve this custom requirement, the developer can access the DropZone element and add the 'k-state-disabled' class (or any other desired custom class/styling) to it conditionally.

Please, check the following example, which demonstrates this behavior:

https://stackblitz.com/edit/angular-qo8pns-qduo44?file=app%2Fupload.component.ts

I hope this helps.

At the moment the requested behavior does not come out of the box, and can be achieved via a custom implementation, similar to the one, demonstrated above.

If you have the time, and would like to see disabling the external drop zone alongside the Upload component as a built-in feature, please log a feature request in our feedback portal, so we can track the demand for this enhancement, and consider it for a future version of the Upload package. 

Thank you in advance.

Regards,
Preslava
Progress Telerik

Tags
Upload
Asked by
Arthur Helmel
Top achievements
Rank 1
Answers by
Preslava
Telerik team
Share this question
or