Kendo-angular: Exception when selecting an item inserted at the beginning of a TreeView's data array

Created on 11 Sep 2018  路  2Comments  路  Source: telerik/kendo-angular

I'm submitting a...

  • Bug report

Current behavior

Exception is thrown when selecting a node that has been inserted into the treeview's data array at the beginning of the array.

Notably, the error does not occur if you insert at the end of the array.

The side effect of this exception is that item is null when nodeClick.emit is ran, so any event handlers that use item will fail.

Line 360 in treeview.component.js:

_this.nodeClick.emit({
                item: lookup.item, // <-- lookup == null
                originalEvent: e,
                type: e.type
            });

Expected behavior

Expect no exception to be thrown when selecting a node.

Minimal reproduction of the problem with instructions

https://stackblitz.com/edit/angular-gpaaue

  1. Click the Add button
  2. Select the Test node.

Environment

Package versions:
Reproducible on TreeView demo

Browser:

  • Chrome (desktop) version 68.0.3440.106 (Official Build) (64-bit)

System:
Reproducible on Stackblitz

Bug treeview

All 2 comments

Fixed in latest dev version.

Was this page helpful?
0 / 5 - 0 ratings