Skip to content

Last item of Grid e.sender.items is undefined #8032

@nelito987

Description

@nelito987

Bug report

When adding a new item to the Grid, and iterating in the items returned by the items() method, the last element is undefined

Reproduction of the problem

  1. Open the Dojo - https://dojo.telerik.com/RtoGQaHa
  2. Click, the 'Add Product' button and observe the console.

Current behavior

The last logged item is undefined.

Expected/desired behavior

There should be no undefined items.

The issue is a regression starting with 2024.1.319 version.

Workaround

itemElements.each((_, $tr) => {
      	const record = e.sender.dataItem($tr);
        
        if (!record) {
        	alert('warning: record not found for table row')
        }
        else {
          // custom logic
        }
      });

Dojo - https://dojo.telerik.com/JpsklRDC

Environment

  • Kendo UI version: 2024.3.1015
  • Browser: [all ]

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions