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

Kendo Grid With TypeScript

1 Answer 403 Views
This is a migrated thread and some comments may be shown as answers.
Evgeni
Top achievements
Rank 1
Evgeni asked on 24 Dec 2018, 05:10 PM

Hello!

 

I have a problem: 

I was going to use kendo-grid with typescript. I use npm packages @progress/kendo-grid-vue-wrapper and typescript version ^2.9.2. When I used sample with localdatasource, I got the error:

 

vue.runtime.esm.js?2b0e:1819 TypeError: Cannot read property 'length' of undefined
    at VueComponent.mounted (index.js?363d:39)
    at callHook (vue.runtime.esm.js?2b0e:3025)
 
in this code @progress/kendo-base-components-vue-wrapper/dist/es/kendo-base-component/index.js?363d
 
 mounted: function mounted() {
        if (this.$el.classList.length > 0) { <-- $this.el is #comment node and does not have classList property
            this.nativeClasses = [].concat(_toConsumableArray(this.$el.classList));
        } else {
            this.nativeClasses = [];
        }

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 26 Dec 2018, 06:32 AM
Hi Evgeni,

Yes indeed the Kendo Vue Wrappers are not written in typescript themselves so such error is expected.  In such case I would recommend to exclude the node_modules from the files that are type checked because the code that is generated in them and used there may not be passing some of your type checks.

If the scenario is somehow different please let me know.

Regards,
Plamen
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
Asked by
Evgeni
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or