
Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
Wayne Hiller
asked on 19 Jun 2018, 05:30 PM
I have a kendo upload inside a kendo window with ref=upload. On window activate I want to clear the files list.
activate() {
this.$refs.upload.kendoWidget().clearAllFiles();
}
Everything works fine until I upload a file. Once a file is uploaded the call to this.$refs.upload.kendoWidget() starts returning null.
9 Answers, 1 is accepted
0
Hello Wayne,
This should be fixed with the latest release. Try upgrading and retest the case. Here you are the logged item: https://github.com/telerik/kendo-ui-core/issues/4147.
Regards,
Ianko
Progress Telerik
This should be fixed with the latest release. Try upgrading and retest the case. Here you are the logged item: https://github.com/telerik/kendo-ui-core/issues/4147.
Regards,
Ianko
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0

Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
answered on 21 Jun 2018, 02:06 PM
What version is it fixed in? The issue is still there in version 2018.2.620.
0
Hello Wayne,
Yes, this is the version that includes the fix. Also, testing with this plunker here (https://plnkr.co/edit/pdIy7BScHrs7Xgswq9Dh?p=preview) I see that the reference to the widget is properly returned.
If you have a different scenario, can you provide some sample code or runnable example to examine that further?
Regards,
Ianko
Progress Telerik
Yes, this is the version that includes the fix. Also, testing with this plunker here (https://plnkr.co/edit/pdIy7BScHrs7Xgswq9Dh?p=preview) I see that the reference to the widget is properly returned.
If you have a different scenario, can you provide some sample code or runnable example to examine that further?
Regards,
Ianko
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0

Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
answered on 21 Jun 2018, 04:03 PM
The package.json file in the node_modules\@progress\kendo-ui folder shows version 2018.2.620 but for some weird reason the js files all have a date of 10/26/1985? My computer date/time is correct.
I will see if can can reproduce the issue in a simple demo.
0

Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
answered on 21 Jun 2018, 05:44 PM
Try clicking the Clear button a few times after an upload.
0
Hi Wayne,
Thanks for the example. Clearing seems to break the kendoWidget method as well. I reopened the issue so that this case is handled too.
A possible workaround with latest version is to change the getting of the instance like so:
Regards,
Ianko
Progress Telerik
Thanks for the example. Clearing seems to break the kendoWidget method as well. I reopened the issue so that this case is handled too.
A possible workaround with latest version is to change the getting of the instance like so:
var
uploadComponent =
this
.$refs.upload
var
uploadWidget = uploadComponent.kendoWidget() || uploadComponent.$_upload
uploadWidget.clearAllFiles()
Regards,
Ianko
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items
0

Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
answered on 22 Jun 2018, 01:44 PM
That works, thank you.
0

Wayne Hiller
Top achievements
Rank 1
Veteran
Iron
answered on 22 Jun 2018, 01:52 PM
My my case the upload is in a kendo window. Is there any way to have a window destroy it's contents on close and then recreate it on open? I would like to populate the files property of the upload when a window is opened but currently the files of the upload can only be set during creation.
0
Hello Wayne,
I am afraid, the Upload cannot update its files collection dynamically. You will need to destroy the instance, remove the files container and recreate the widget. Here you are an example: https://plnkr.co/edit/ME0ipd5V0VB2FokgHg2O?p=preview.
If you are to destroy the Window contents, the Vue $el will be removed too and the Vue component might fail to process the vnode afterwards.
Regards,
Ianko
Progress Telerik
I am afraid, the Upload cannot update its files collection dynamically. You will need to destroy the instance, remove the files container and recreate the widget. Here you are an example: https://plnkr.co/edit/ME0ipd5V0VB2FokgHg2O?p=preview.
If you are to destroy the Window contents, the Vue $el will be removed too and the Vue component might fail to process the vnode afterwards.
Regards,
Ianko
Progress Telerik
Do you want to have your say when we set our development plans?
Do you want to know when a feature you care about is added or when a bug fixed?
Explore the
Telerik Feedback Portal
and vote to affect the priority of the items