0
votes

I need help on kendo ui for angular 4.

https://www.telerik.com/kendo-angular-ui/components/grid/editing/external-editing/

when i put edit.service.ts in my local code its shows me.

.service.ts (29,21): Type '{}' is not assignable to type 'any[]'. Property 'includes' is missing in type '{}'.

this.fetch()
            .pipe(
                tap(data => {
                    this.data = data;
                })
            )
            .subscribe(data => {
                super.next(data);
            });

I need help with it.

1

1 Answers

0
votes

The error suggests that you are trying to assign an object value ({}) to a field of Array type ("any[]"), most likely in the following statement:

this.fetch() .pipe( tap(data => { this.data = data; }) ) .subscribe(data => { super.next(data); });

... where the incoming "data" is an object, while the type of "this.data" is set to any[].

You should either change the type of this.data or somehow process the response from the http call so that you extract an array of data items from it (that can be then assigned to the this.data field).