@refinitiv-ui/efx-grid 6.0.112 → 6.0.113

Sign up to get free protection for your applications and to get access to all the features.
@@ -74,6 +74,7 @@ let _createHiddenInput = function () {
74
74
  styleObj.position = "absolute";
75
75
  styleObj.width = styleObj.height = styleObj.padding = styleObj.border = "0";
76
76
  hiddenInput.value = "0";
77
+ hiddenInput.role = "grid";
77
78
  return hiddenInput;
78
79
  };
79
80
  /** @private
@@ -620,7 +621,7 @@ Core.prototype._hasPendingRowChange = false;
620
621
  * @return {string}
621
622
  */
622
623
  Core.getVersion = function () {
623
- return "5.1.113";
624
+ return "5.1.115";
624
625
  };
625
626
  /** {@link ElementWrapper#dispose}
626
627
  * @override
@@ -3740,9 +3741,16 @@ Core.prototype.getVerticalViewInfo = function() {
3740
3741
  let viewTop = this._vscrollbar.getScrollTop() + heightOffset;
3741
3742
  let viewBottom = viewTop + viewHeight;
3742
3743
 
3744
+ let topRowIndex = this._layoutY.hitTest(viewTop) - rowIndexOffset;
3745
+ let bottomRowIndex = this._layoutY.hitTest(viewBottom - 0.1) - rowIndexOffset;
3746
+ let laneTop = this._layoutY.getLaneStart(topRowIndex + rowIndexOffset);
3747
+ let laneBottom = this._layoutY.getLaneEnd(bottomRowIndex + rowIndexOffset);
3748
+
3743
3749
  return {
3744
- topRowIndex: this._layoutY.hitTest(viewTop) - rowIndexOffset,
3745
- bottomRowIndex: this._layoutY.hitTest(viewBottom - 0.1) - rowIndexOffset
3750
+ topRowIndex: topRowIndex,
3751
+ firstFullRow: (laneTop < viewTop) ? topRowIndex + 1 : topRowIndex,
3752
+ lastFullRow: (laneBottom > viewBottom) ? bottomRowIndex - 1 : bottomRowIndex,
3753
+ bottomRowIndex: bottomRowIndex
3746
3754
  };
3747
3755
  };
3748
3756
  /** @public
@@ -3764,8 +3772,8 @@ Core.prototype.getVScrollView = function () {
3764
3772
  let topRowIndex = this._layoutY.hitTest(viewTop);
3765
3773
  let bottomRowIndex = this._layoutY.hitTest(viewBottom - 0.1);
3766
3774
 
3767
- let laneTop = this._layoutY.getLaneStart(topRowIndex);
3768
- let laneBottom = this._layoutY.getLaneEnd(bottomRowIndex);
3775
+ let laneTop = this._layoutY.getLaneStart(topRowIndex + rowIndexOffset);
3776
+ let laneBottom = this._layoutY.getLaneEnd(bottomRowIndex + rowIndexOffset);
3769
3777
 
3770
3778
  let prevAnchor = viewTop - viewHeight;
3771
3779
  let prevPage = (prevAnchor <= heightOffset) ? rowIndexOffset : this._layoutY.hitTest(prevAnchor) + 1;
@@ -358,6 +358,7 @@ Cell.prototype.initialize = function () {
358
358
  this._aligner = document.createElement("button");
359
359
  }
360
360
  this._aligner.className = "valigner";
361
+ this._aligner.role = "gridcell";
361
362
  if(this._frontIcon) {
362
363
  this._element.appendChild(this._frontIcon.getElement());
363
364
  }
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.112" };
3
+ window.EFX_GRID = { version: "6.0.113" };
@@ -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 = {