@acorex/data-grid 6.5.61 → 6.5.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1107,18 +1107,20 @@ class AXDataGridComponent {
1107
1107
  this.gridApi.forEachNode((node) => {
1108
1108
  if (node.data !== undefined) {
1109
1109
  let select = false;
1110
- this.selectRow.forEach((item) => {
1111
- if (item.rowIndex != undefined && item.rowLevel != undefined) {
1112
- if (node.data[this.keyField] === item.data[this.keyField]) {
1113
- select = true;
1110
+ if (this.selectRow.length) {
1111
+ this.selectRow.forEach((item) => {
1112
+ if (item.rowIndex != undefined && item.rowLevel != undefined) {
1113
+ if (node.data[this.keyField] === item.data[this.keyField]) {
1114
+ select = true;
1115
+ }
1114
1116
  }
1115
- }
1116
- else {
1117
- if (node.data[this.keyField] === item[this.keyField]) {
1118
- select = true;
1117
+ else {
1118
+ if (this.keyField && node.data[this.keyField] === item[this.keyField]) {
1119
+ select = true;
1120
+ }
1119
1121
  }
1120
- }
1121
- });
1122
+ });
1123
+ }
1122
1124
  node.setSelected(select);
1123
1125
  }
1124
1126
  });