@refinitiv-ui/efx-grid 6.0.111 → 6.0.113

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.
@@ -36293,7 +36293,7 @@ Core.prototype._hasPendingRowChange = false;
36293
36293
  * @return {string}
36294
36294
  */
36295
36295
  Core.getVersion = function () {
36296
- return "5.1.112";
36296
+ return "5.1.114";
36297
36297
  };
36298
36298
  /** {@link ElementWrapper#dispose}
36299
36299
  * @override
@@ -39413,9 +39413,16 @@ Core.prototype.getVerticalViewInfo = function() {
39413
39413
  let viewTop = this._vscrollbar.getScrollTop() + heightOffset;
39414
39414
  let viewBottom = viewTop + viewHeight;
39415
39415
 
39416
+ let topRowIndex = this._layoutY.hitTest(viewTop) - rowIndexOffset;
39417
+ let bottomRowIndex = this._layoutY.hitTest(viewBottom - 0.1) - rowIndexOffset;
39418
+ let laneTop = this._layoutY.getLaneStart(topRowIndex + rowIndexOffset);
39419
+ let laneBottom = this._layoutY.getLaneEnd(bottomRowIndex + rowIndexOffset);
39420
+
39416
39421
  return {
39417
- topRowIndex: this._layoutY.hitTest(viewTop) - rowIndexOffset,
39418
- bottomRowIndex: this._layoutY.hitTest(viewBottom - 0.1) - rowIndexOffset
39422
+ topRowIndex: topRowIndex,
39423
+ firstFullRow: (laneTop < viewTop) ? topRowIndex + 1 : topRowIndex,
39424
+ lastFullRow: (laneBottom > viewBottom) ? bottomRowIndex - 1 : bottomRowIndex,
39425
+ bottomRowIndex: bottomRowIndex
39419
39426
  };
39420
39427
  };
39421
39428
  /** @public
@@ -39437,8 +39444,8 @@ Core.prototype.getVScrollView = function () {
39437
39444
  let topRowIndex = this._layoutY.hitTest(viewTop);
39438
39445
  let bottomRowIndex = this._layoutY.hitTest(viewBottom - 0.1);
39439
39446
 
39440
- let laneTop = this._layoutY.getLaneStart(topRowIndex);
39441
- let laneBottom = this._layoutY.getLaneEnd(bottomRowIndex);
39447
+ let laneTop = this._layoutY.getLaneStart(topRowIndex + rowIndexOffset);
39448
+ let laneBottom = this._layoutY.getLaneEnd(bottomRowIndex + rowIndexOffset);
39442
39449
 
39443
39450
  let prevAnchor = viewTop - viewHeight;
39444
39451
  let prevPage = (prevAnchor <= heightOffset) ? rowIndexOffset : this._layoutY.hitTest(prevAnchor) + 1;
@@ -40699,6 +40706,9 @@ Core.prototype._dispatchRowExpansionBinding = function (e) {
40699
40706
  }
40700
40707
 
40701
40708
  let ctxRow = section.getContextRow(r);
40709
+ if(!ctxRow) {
40710
+ continue; // The row may have been pushed out of view due to row count or height changed during the binding
40711
+ }
40702
40712
  let parentId = dataView.getExpansionParentByRowId(rowId);
40703
40713
  if(parentId) { // dispatch to render row expansion
40704
40714
  e["originalRowData"] = dataView.getRowData(parentId);
@@ -48797,12 +48807,12 @@ Grid.prototype._focusNextCellContent = function(args) {
48797
48807
  let grid = this._grid;
48798
48808
  let section = grid.getSection("content");
48799
48809
  let viewInfo = grid.getVerticalViewInfo();
48800
- let bottomRowIndex = viewInfo.bottomRowIndex;
48810
+ let lastFullRow = viewInfo.lastFullRow;
48801
48811
  let rowCount = this.getRowCount();
48802
48812
  for(let r = rowIndex; r < rowCount; r++) {
48803
48813
  for(i = startIdx; i < len; i++) {
48804
48814
  let c = focusableColIndices[i];
48805
- if(r > bottomRowIndex) {
48815
+ if(r > lastFullRow) {
48806
48816
  this._requestScroll(args, c, r);
48807
48817
  return;
48808
48818
  } else {
@@ -48852,11 +48862,11 @@ Grid.prototype._focusPrevCellContent = function(args) {
48852
48862
  let grid = this._grid;
48853
48863
  let section = grid.getSection("content");
48854
48864
  let viewInfo = grid.getVerticalViewInfo();
48855
- let topRowIndex = viewInfo.topRowIndex;
48865
+ let firstFullRow = viewInfo.firstFullRow;
48856
48866
  for(let r = rowIndex; r >= 0; r--) {
48857
48867
  for(i = startIdx; i >= 0; i--) {
48858
48868
  let c = focusableColIndices[i];
48859
- if(r < topRowIndex) {
48869
+ if(r < firstFullRow) {
48860
48870
  this._requestScroll(args, c, r);
48861
48871
  return;
48862
48872
  } else {
@@ -48910,7 +48920,7 @@ Grid.prototype._onTabNavigation = function(e) {
48910
48920
  }
48911
48921
  let startingRowIndex = pos["rowIndex"];
48912
48922
  if(e.onTheEdge) {
48913
- let viewInfo = this._grid.getVScrollView();
48923
+ let viewInfo = this._grid.getVerticalViewInfo();
48914
48924
  startingRowIndex = keyEvt.shiftKey ? viewInfo.lastFullRow : viewInfo.firstFullRow;
48915
48925
  }
48916
48926
  let args = {