@refinitiv-ui/efx-grid 6.0.101 → 6.0.102

Sign up to get free protection for your applications and to get access to all the features.
@@ -1130,6 +1130,11 @@ RowDefinition.prototype._toRealTimeRow = function() {
1130
1130
  this._parent = null;
1131
1131
  this._depthLevel = 0;
1132
1132
 
1133
+ // Add static value to the new allocated row
1134
+ if(this._staticValues) {
1135
+ this.setRowData(this._staticValues);
1136
+ }
1137
+
1133
1138
  this.subscribeForUpdates();
1134
1139
  };
1135
1140
 
@@ -1148,8 +1153,12 @@ RowDefinition.prototype.unlinkChain = function() {
1148
1153
  }
1149
1154
  }
1150
1155
 
1156
+ let staticData = this._getStaticRowData();
1151
1157
  this.unsubscribeForUpdates();
1152
1158
 
1159
+ // Restore static data
1160
+ this.setStaticRowData(staticData);
1161
+
1153
1162
  let view = this._view;
1154
1163
  if(view) {
1155
1164
  let rid = this.getRowId();
@@ -474,8 +474,11 @@ CellSelectionPlugin.prototype._onMouseMove = function (e) {
474
474
  }
475
475
  var activeGrid = this._getActiveGrid();
476
476
  var newMouse = activeGrid.getRelativePosition(e);
477
- if (newMouse.sectionIndex === 0) {
478
- // prevent first row (header) selection
477
+
478
+ // Avoid cross section selection but scrolling is still working
479
+ if (this._anchor["sectionType"] === "title" && newMouse["sectionType"] !== "title") {
480
+ return;
481
+ } else if (this._anchor["sectionType"] === "content" && newMouse["sectionType"] === "title") {
479
482
  return;
480
483
  }
481
484
  if (!newMouse['hit']) {
@@ -1158,17 +1161,24 @@ CellSelectionPlugin.prototype._updateSelection = function (tgtRect) {
1158
1161
  var x = this._curRect.left;
1159
1162
  var y = this._curRect.top;
1160
1163
  var mapInfo = this._map[y];
1161
- var contentType = mapInfo ? mapInfo.type === "content" : false;
1162
1164
  var w = 0;
1163
1165
  var h = 0;
1164
- if (contentType) {
1166
+ if (mapInfo) {
1165
1167
  w = this._curRect.right - x;
1166
1168
  h = this._curRect.bottom - y;
1167
1169
  y -= mapInfo.rowOffset;
1168
- }
1169
- var contentSect = activeGrid.getSection("content");
1170
- if (contentSect) {
1171
- contentSect.setCellBounds(x, y, w, h);
1170
+ var contentType = mapInfo.type;
1171
+ if (contentType === "content") {
1172
+ var contentSect = activeGrid.getSection("content");
1173
+ if (contentSect) {
1174
+ contentSect.setCellBounds(x, y, w, h);
1175
+ }
1176
+ } else {
1177
+ var titleSect = activeGrid.getSection("title");
1178
+ if (titleSect) {
1179
+ titleSect.setCellBounds(x, y, w, h);
1180
+ }
1181
+ }
1172
1182
  }
1173
1183
  }
1174
1184
  };
@@ -1359,6 +1369,10 @@ CellSelectionPlugin.prototype.deselectAll = function () {
1359
1369
  if (contentSect) {
1360
1370
  contentSect.setCellBounds(0, 0, 0, 0);
1361
1371
  }
1372
+ var titleSect = activeGrid.getSection("title");
1373
+ if (titleSect) {
1374
+ titleSect.setCellBounds(0, 0, 0, 0);
1375
+ }
1362
1376
  }
1363
1377
  this._lastSelection = this.getSelectionBounds();
1364
1378
  this._anchor = null;
@@ -1706,6 +1706,14 @@ RowFilteringPlugin._formatArrayExpression = function(exp, field, formatter) {
1706
1706
  }
1707
1707
  return null;
1708
1708
  };
1709
+ /** For mocking dialog instance
1710
+ * @public
1711
+ * @ignore
1712
+ * @param {*} dialog
1713
+ */
1714
+ RowFilteringPlugin.prototype.setDialog = function(dialog) {
1715
+ this._filterDialog = dialog;
1716
+ };
1709
1717
  /** @public
1710
1718
  * @param {number} colIndex
1711
1719
  * @param {RowFilteringPlugin~FilterDialogOptions=} runtimeDialogOptions
@@ -11,6 +11,7 @@ import SelectionList from "./util/SelectionList.js";
11
11
  import ILayoutGrid from "./ILayoutGrid.js";
12
12
  import ElementWrapper from "./components/ElementWrapper.js";
13
13
  import HScrollbar from "./components/HScrollbar.js";
14
+ import CellBoundPainter from "./util/CellBoundPainter.js";
14
15
 
15
16
  declare class LayoutGrid extends ElementWrapper {
16
17
 
@@ -6,6 +6,7 @@ import ILayoutGrid from "./ILayoutGrid.js";
6
6
  import LayoutGrid from "./LayoutGrid.js";
7
7
  import ElementWrapper from "./components/ElementWrapper.js";
8
8
  import HScrollbar from "./components/HScrollbar.js";
9
+ import CellBoundPainter from "./util/CellBoundPainter.js";
9
10
 
10
11
  declare class VirtualizedLayoutGrid extends ElementWrapper {
11
12
 
@@ -0,0 +1,16 @@
1
+
2
+
3
+ declare class CellBoundPainter {
4
+
5
+ constructor(ctx: any);
6
+
7
+ public dispose(): void;
8
+
9
+ public setCellBounds(colIndex: number, rowIndex: number, width: number, height: number, colCount: number): void;
10
+
11
+ public updateCellBounds(): void;
12
+
13
+ }
14
+
15
+ export default CellBoundPainter;
16
+ export { CellBoundPainter };
package/lib/versions.json CHANGED
@@ -6,7 +6,7 @@
6
6
  "@grid/statistics-row": "1.0.17",
7
7
  "@grid/zoom": "1.0.11",
8
8
  "tr-grid-auto-tooltip": "1.1.6",
9
- "tr-grid-cell-selection": "1.0.37",
9
+ "tr-grid-cell-selection": "1.0.38",
10
10
  "tr-grid-checkbox": "1.0.67",
11
11
  "tr-grid-column-fitter": "1.0.40",
12
12
  "tr-grid-column-formatting": "0.9.36",
@@ -24,7 +24,7 @@
24
24
  "tr-grid-percent-bar": "1.0.24",
25
25
  "tr-grid-range-bar": "2.0.8",
26
26
  "tr-grid-row-dragging": "1.0.35",
27
- "tr-grid-row-filtering": "1.0.75",
27
+ "tr-grid-row-filtering": "1.0.76",
28
28
  "tr-grid-row-grouping": "1.0.87",
29
29
  "tr-grid-row-selection": "1.0.30",
30
30
  "tr-grid-rowcoloring": "1.0.25",
package/package.json CHANGED
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "version": "6.0.101"
69
+ "version": "6.0.102"
70
70
  }