@refinitiv-ui/efx-grid 6.0.164 → 6.0.165

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.
@@ -622,7 +622,7 @@ Core.prototype._hasPendingRowChange = false;
622
622
  * @return {string}
623
623
  */
624
624
  Core.getVersion = function () {
625
- return "5.2.2";
625
+ return "5.2.3";
626
626
  };
627
627
  /** {@link ElementWrapper#dispose}
628
628
  * @override
@@ -1331,11 +1331,13 @@ Core.prototype.getCellInfo = function (cellRef) {
1331
1331
  let ss = this.getSectionSettings(sectionName);
1332
1332
  if(ss) {
1333
1333
  let s = ss.getSection();
1334
- let cell = s.getCell(colIndex, rowIndex);
1335
- if(cell) {
1336
- mouseInfo = {};
1337
- mouseInfo["colIndex"] = colIndex;
1338
- mouseInfo["rowIndex"] = rowIndex;
1334
+ // WARNING: getCellInfo does not required cell to exist in the DOM (i.e., virtualized or hidden cells are included)
1335
+ if(colIndex >= 0 && colIndex < s.getColumnCount() &&
1336
+ rowIndex >= 0 && rowIndex < s.getRowCount()) {
1337
+ mouseInfo = {
1338
+ "colIndex": colIndex,
1339
+ "rowIndex": rowIndex
1340
+ };
1339
1341
  ss.extendEventArg(mouseInfo);
1340
1342
  }
1341
1343
  }
package/lib/grid/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import {Grid} from "./lib/efx-grid.js";
2
2
  export {Grid}
3
- window.EFX_GRID = { version: "6.0.164" };
3
+ window.EFX_GRID = { version: "6.0.165" };
@@ -36809,7 +36809,7 @@ Core.prototype._hasPendingRowChange = false;
36809
36809
  * @return {string}
36810
36810
  */
36811
36811
  Core.getVersion = function () {
36812
- return "5.2.2";
36812
+ return "5.2.3";
36813
36813
  };
36814
36814
  /** {@link ElementWrapper#dispose}
36815
36815
  * @override
@@ -37518,11 +37518,13 @@ Core.prototype.getCellInfo = function (cellRef) {
37518
37518
  let ss = this.getSectionSettings(sectionName);
37519
37519
  if(ss) {
37520
37520
  let s = ss.getSection();
37521
- let cell = s.getCell(colIndex, rowIndex);
37522
- if(cell) {
37523
- mouseInfo = {};
37524
- mouseInfo["colIndex"] = colIndex;
37525
- mouseInfo["rowIndex"] = rowIndex;
37521
+ // WARNING: getCellInfo does not required cell to exist in the DOM (i.e., virtualized or hidden cells are included)
37522
+ if(colIndex >= 0 && colIndex < s.getColumnCount() &&
37523
+ rowIndex >= 0 && rowIndex < s.getRowCount()) {
37524
+ mouseInfo = {
37525
+ "colIndex": colIndex,
37526
+ "rowIndex": rowIndex
37527
+ };
37526
37528
  ss.extendEventArg(mouseInfo);
37527
37529
  }
37528
37530
  }
@@ -49024,14 +49026,16 @@ Grid_Grid.prototype._onPreDataSorting = function (e) {
49024
49026
  let sortCount = objs.length;
49025
49027
  for(let i = 0; i < sortCount; ++i) {
49026
49028
  let obj = objs[i];
49027
- let field = obj["field"] || "";
49029
+ let field = obj["field"] || ""; // This supports "sortBy" option (sort by another column)
49028
49030
  let colIndex = obj["colIndex"];
49029
49031
  let colDef = (colIndex >= 0) ? this.getColumnDefinition(colIndex) : null;
49030
49032
 
49031
49033
  let rowSorting = false;
49032
49034
  let sortLogic = null;
49033
49035
  if(colDef) {
49034
- field = colDef.getField(); // WARNING: Field and logic could be out of sync
49036
+ if(!field) {
49037
+ field = colDef.getField(); // WARNING: Field and logic could be out of sync
49038
+ }
49035
49039
  rowSorting = colDef.isRowSorting();
49036
49040
  sortLogic = colDef.getSorter();
49037
49041
  }