@acorex/data-grid 6.5.62 → 6.5.64

Sign up to get free protection for your applications and to get access to all the features.
@@ -1086,7 +1086,6 @@ class AXDataGridComponent {
1086
1086
  //
1087
1087
  }
1088
1088
  gridSelectRow() {
1089
- debugger;
1090
1089
  if (this.gridApi) {
1091
1090
  if (this.selectRow &&
1092
1091
  this.selectRow.length > 0 &&
@@ -1108,18 +1107,20 @@ class AXDataGridComponent {
1108
1107
  this.gridApi.forEachNode((node) => {
1109
1108
  if (node.data !== undefined) {
1110
1109
  let select = false;
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;
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
+ }
1115
1116
  }
1116
- }
1117
- else {
1118
- if (node.data[this.keyField] === item[this.keyField]) {
1119
- select = true;
1117
+ else {
1118
+ if (this.keyField !== 'null' && node.data[this.keyField] === item[this.keyField]) {
1119
+ select = true;
1120
+ }
1120
1121
  }
1121
- }
1122
- });
1122
+ });
1123
+ }
1123
1124
  node.setSelected(select);
1124
1125
  }
1125
1126
  });