Viewport is undefined and tries to acess the lastItemIndex

1 Answer 203 Views
Grid
Iván
Top achievements
Rank 1
Iván asked on 14 Oct 2021, 06:23 PM

In my grid, I get this error when I set the navigable property true:

I guess that is happening because they are still no rows in the grid (they load with the API response) and it accesses the unregisterRow method for some reason. 

The needsViewPort() is the only one condition, but it does not check if this.viewPort is undefined.

 

There is a way to condition the navigable property to wait the API response and then set it true?

Thanks.


1 Answer, 1 is accepted

Sort by
0
Martin Bechev
Telerik team
answered on 19 Oct 2021, 07:34 AM

Hello Iván,

Thank you for the provided details.

A similar error was thrown when virtual scrolling and navigation are enabled and no data is available. Indeed this was an issue on our side which is currently fixed in the v5.4.1 of the Grid package:

https://github.com/telerik/kendo-angular/issues/3391

Please try updating the package to its latest version following the steps from this article:

https://www.telerik.com/kendo-angular-ui/components/installation/up-to-date/

I recommend deleting the node_modules folder and package-lock.json file before updating the versions, to ensure that there are no cached older versions. Then reinstall the dependencies (npm install).

In case the issue persists, could I ask you for a runnable demo (StackBlitz or isolated project) that reproduces the reported issue, so that we can have a look at the Grid configurations. Thank you in advance.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Iván
Top achievements
Rank 1
Answers by
Martin Bechev
Telerik team
Share this question
or