@refinitiv-ui/efx-grid 6.0.26 → 6.0.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. package/lib/core/dist/core.js +287 -34
  2. package/lib/core/dist/core.min.js +1 -1
  3. package/lib/core/es6/data/DataTable.d.ts +1 -1
  4. package/lib/core/es6/data/DataTable.js +3 -2
  5. package/lib/core/es6/data/DataView.d.ts +1 -1
  6. package/lib/core/es6/data/DataView.js +3 -2
  7. package/lib/core/es6/data/Segment.d.ts +1 -1
  8. package/lib/core/es6/data/Segment.js +12 -3
  9. package/lib/core/es6/data/SegmentCollection.d.ts +1 -1
  10. package/lib/core/es6/data/SegmentCollection.js +3 -2
  11. package/lib/core/es6/grid/Core.d.ts +17 -3
  12. package/lib/core/es6/grid/Core.js +226 -20
  13. package/lib/core/es6/grid/components/Scrollbar.js +6 -0
  14. package/lib/grid/index.js +1 -1
  15. package/lib/row-segmenting/es6/RowSegmenting.js +21 -2
  16. package/lib/rt-grid/dist/rt-grid.js +418 -238
  17. package/lib/rt-grid/dist/rt-grid.min.js +1 -1
  18. package/lib/rt-grid/es6/ColumnDefinition.d.ts +2 -2
  19. package/lib/rt-grid/es6/ColumnDefinition.js +71 -70
  20. package/lib/rt-grid/es6/Grid.d.ts +9 -2
  21. package/lib/rt-grid/es6/Grid.js +55 -132
  22. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.d.ts +12 -2
  23. package/lib/tr-grid-column-grouping/es6/ColumnGrouping.js +138 -47
  24. package/lib/tr-grid-column-stack/es6/ColumnStack.d.ts +14 -1
  25. package/lib/tr-grid-column-stack/es6/ColumnStack.js +317 -187
  26. package/lib/tr-grid-range-bar/es6/RangeBar.d.ts +4 -0
  27. package/lib/tr-grid-range-bar/es6/RangeBar.js +8 -0
  28. package/lib/tr-grid-util/es6/GridPlugin.d.ts +6 -0
  29. package/lib/tr-grid-util/es6/GridPlugin.js +67 -0
  30. package/lib/tr-grid-util/es6/GroupDefinitions.d.ts +5 -1
  31. package/lib/tr-grid-util/es6/GroupDefinitions.js +34 -5
  32. package/lib/types/es6/ColumnGrouping.d.ts +12 -2
  33. package/lib/types/es6/ColumnStack.d.ts +14 -1
  34. package/lib/types/es6/Core/data/DataTable.d.ts +1 -1
  35. package/lib/types/es6/Core/data/DataView.d.ts +1 -1
  36. package/lib/types/es6/Core/data/Segment.d.ts +1 -1
  37. package/lib/types/es6/Core/data/SegmentCollection.d.ts +1 -1
  38. package/lib/types/es6/Core/grid/Core.d.ts +17 -3
  39. package/lib/types/es6/RealtimeGrid/ColumnDefinition.d.ts +2 -2
  40. package/lib/types/es6/RealtimeGrid/Grid.d.ts +9 -2
  41. package/lib/versions.json +5 -5
  42. package/package.json +1 -1
@@ -98,7 +98,7 @@ declare class DataTable extends DataCache {
98
98
 
99
99
  public addSegmentChild(segmentId: string, rid: string, dataId?: string|null): boolean;
100
100
 
101
- public addSegmentChildren(segmentId: string, rids: (string)[]|null): boolean;
101
+ public addSegmentChildren(segmentId: string, rids: (string)[]|null, dataIds?: (string)[]|null): boolean;
102
102
 
103
103
  public removeSegmentChild(segmentId: string, rid: string): boolean;
104
104
 
@@ -1144,11 +1144,12 @@ DataTable.prototype.addSegmentChild = function(segmentId, rid, dataId) {
1144
1144
  /** @public
1145
1145
  * @param {string} segmentId Row id
1146
1146
  * @param {Array.<string>} rids Row id
1147
+ * @param {Array.<string>=} dataIds Row ids for retrieving data
1147
1148
  * @return {boolean} Return true if there is any change
1148
1149
  */
1149
- DataTable.prototype.addSegmentChildren = function(segmentId, rids) {
1150
+ DataTable.prototype.addSegmentChildren = function(segmentId, rids, dataIds) {
1150
1151
  if(this._segments) {
1151
- var dirty = this._segments.addSegmentChildren(segmentId, rids);
1152
+ var dirty = this._segments.addSegmentChildren(segmentId, rids, dataIds);
1152
1153
  if(dirty) {
1153
1154
  if(this._sort(null)) {
1154
1155
  this._dispatchPositionChange();
@@ -258,7 +258,7 @@ declare class DataView extends EventDispatcher {
258
258
 
259
259
  public addSegmentChild(segmentRef: string|number|null, rowRef: string|number|null, dataId?: string|null): boolean;
260
260
 
261
- public addSegmentChildren(segmentRef: string|number|null, rowRefs: (string|number)[]|null): boolean;
261
+ public addSegmentChildren(segmentRef: string|number|null, rowRefs: (string|number)[]|null, dataIds?: (string)[]|null): boolean;
262
262
 
263
263
  public removeSegmentChild(segmentRef: string|number|null, rowRef: string|number|null): boolean;
264
264
 
@@ -2473,13 +2473,14 @@ DataView.prototype.addSegmentChild = function(segmentRef, rowRef, dataId) {
2473
2473
  /** @public
2474
2474
  * @param {string|number} segmentRef Row id or row index
2475
2475
  * @param {Array.<string|number>} rowRefs Array of row ids or row indices
2476
+ * @param {Array.<string>=} dataIds Row ids for retrieving data
2476
2477
  * @return {boolean} Return true if there is any change
2477
2478
  */
2478
- DataView.prototype.addSegmentChildren = function(segmentRef, rowRefs) {
2479
+ DataView.prototype.addSegmentChildren = function(segmentRef, rowRefs, dataIds) {
2479
2480
  if(this._dt._getSegmentSeparators()) {
2480
2481
  var segmentId = this._toRowId(segmentRef);
2481
2482
  var rowIds = this._toRowIds(rowRefs);
2482
- return this._dt.addSegmentChildren(segmentId, rowIds);
2483
+ return this._dt.addSegmentChildren(segmentId, rowIds, dataIds);
2483
2484
  }
2484
2485
  return false;
2485
2486
  };
@@ -15,7 +15,7 @@ declare class Segment extends EventDispatcher {
15
15
 
16
16
  public addChild(rid: string, dataId?: string|null): boolean;
17
17
 
18
- public addChildren(rids: (string)[]|null): boolean;
18
+ public addChildren(rids: (string)[]|null, dataIds?: (string)[]|null): boolean;
19
19
 
20
20
  public containsChild(rid: string): boolean;
21
21
 
@@ -189,14 +189,23 @@ Segment.prototype.addChild = function(rid, dataId) {
189
189
  };
190
190
  /** @public
191
191
  * @param {Array.<string>} rids
192
+ * @param {Array.<string>=} dataIds Row ids for retrieving data
192
193
  * @return {boolean}
193
194
  */
194
- Segment.prototype.addChildren = function(rids) {
195
+ Segment.prototype.addChildren = function(rids, dataIds) {
195
196
  var rowIds = Array.isArray(rids) ? rids : [rids];
196
197
  var rowCount = rowIds.length;
197
198
  var dirty = 0;
198
- for(var i = 0; i < rowCount; ++i) {
199
- dirty |= this.addChild(rowIds[i]);
199
+ var i;
200
+ if(dataIds != null) {
201
+ dataIds = Array.isArray(dataIds) ? dataIds : [dataIds];
202
+ for(i = 0; i < rowCount; ++i) {
203
+ dirty |= this.addChild(rowIds[i], dataIds[i]);
204
+ }
205
+ } else {
206
+ for(i = 0; i < rowCount; ++i) {
207
+ dirty |= this.addChild(rowIds[i]);
208
+ }
200
209
  }
201
210
  return dirty ? true : false;
202
211
  };
@@ -40,7 +40,7 @@ declare class SegmentCollection extends EventDispatcher {
40
40
 
41
41
  public addSegmentChild(segmentId: string, rid: string, dataId?: string|null): boolean;
42
42
 
43
- public addSegmentChildren(segmentId: string, rids: (string)[]|null): boolean;
43
+ public addSegmentChildren(segmentId: string, rids: (string)[]|null, dataIds?: (string)[]|null): boolean;
44
44
 
45
45
  public containsSegmentChild(segmentId: string, rid: string): boolean;
46
46
 
@@ -280,12 +280,13 @@ SegmentCollection.prototype.addSegmentChild = function(segmentId, rid, dataId) {
280
280
  /** @public
281
281
  * @param {string} segmentId
282
282
  * @param {Array.<string>} rids
283
+ * @param {Array.<string>=} dataIds Row ids for retrieving data
283
284
  * @return {boolean} Returns true if there is any change. Otherwise, returns false
284
285
  */
285
- SegmentCollection.prototype.addSegmentChildren = function(segmentId, rids) {
286
+ SegmentCollection.prototype.addSegmentChildren = function(segmentId, rids, dataIds) {
286
287
  var segment = this._segments[segmentId];
287
288
  if(segment && !segment.isSubSegment()) {
288
- return segment.addChildren(rids);
289
+ return segment.addChildren(rids, dataIds);
289
290
  }
290
291
  return false;
291
292
  };
@@ -133,6 +133,10 @@ declare class Core extends ElementWrapper {
133
133
 
134
134
  public moveColumn(fromCol: number|(number)[]|null, destCol: number): boolean;
135
135
 
136
+ public moveColumnById(srcCol: number|string|null, destCol?: (number|string)|null): boolean;
137
+
138
+ public reorderColumns(colRefs: number|string|(number|string)[]|null, destCol?: (number|string)|null): boolean;
139
+
136
140
  public addRow(opt_num?: number|null): void;
137
141
 
138
142
  public removeRow(opt_num?: number|null): void;
@@ -297,8 +301,6 @@ declare class Core extends ElementWrapper {
297
301
 
298
302
  public getRelativePosition(obj: ElementWrapper|Element|Event|MouseEvent, context?: any): Core.MouseInfo;
299
303
 
300
- public getColumnIndex(str: string): number;
301
-
302
304
  public getVScrollbar(): ElementWrapper;
303
305
 
304
306
  public getHScrollbar(): ElementWrapper;
@@ -393,6 +395,18 @@ declare class Core extends ElementWrapper {
393
395
 
394
396
  public getColumnIds(): (string)[];
395
397
 
398
+ public setColumnField(colIndex: number, field: string): void;
399
+
400
+ public getColumnField(colIndex: number): string;
401
+
402
+ public getColumnFields(): (string)[];
403
+
404
+ public getColumnIndex(colRef: string|number|null): number;
405
+
406
+ public getColumnIndices(colRefs: (number|string)[]|null): (number)[];
407
+
408
+ public getColumnIndexMap(): { [key: string]: number };
409
+
396
410
  }
397
411
 
398
412
  declare function num(opt_type?: string|null): (ILayoutGrid)[];
@@ -409,7 +423,7 @@ declare function section(): number;
409
423
 
410
424
  declare function path(obj: ElementWrapper|Element|Event|MouseEvent, context?: any): Core.MouseInfo;
411
425
 
412
- declare function cellElement(str: string): number;
426
+ declare function cellElement(): ElementWrapper;
413
427
 
414
428
  export default Core;
415
429
  export { Core };
@@ -536,7 +536,7 @@ Core.prototype._groupDefs = null;
536
536
  * @return {string}
537
537
  */
538
538
  Core.getVersion = function () {
539
- return "5.1.34";
539
+ return "5.1.38";
540
540
  };
541
541
  /** {@link ElementWrapper#dispose}
542
542
  * @override
@@ -652,6 +652,12 @@ Core.prototype.getConfigObject = function (gridOptions) {
652
652
  }
653
653
 
654
654
  var columnDef = this._getColumnDef(colIndex);
655
+ if(columnDef["userId"]) {
656
+ column["id"] = columnDef["userId"];
657
+ }
658
+ if(columnDef["field"]) {
659
+ column["field"] = columnDef["field"];
660
+ }
655
661
  if (columnDef["styles"]) {
656
662
  column["styles"] = columnDef["styles"];
657
663
  }
@@ -1736,6 +1742,126 @@ Core.prototype._moveColumn = function (fromCol, destCol) {
1736
1742
  return true;
1737
1743
  };
1738
1744
 
1745
+ /** If source column is not found, no operation is performed. If destination column is not found, the source column will be moved to the last position.<br>
1746
+ * Note: this method behaves slightly different from moveColumn method in that it always put source column at the position before the specified destination column, while moveColumn method will put column at exactly at the destination index.
1747
+ * @public
1748
+ * @param {number|string} srcCol Column Id or index
1749
+ * @param {(number|string)=} destCol Column Id or index of the destination
1750
+ * @return {boolean} Return true if there is any change, and false otherwise
1751
+ * @see {@link Core#moveColumn}
1752
+ * @example
1753
+ * grid.moveColumnById(3, 1); // Move column 3 to position before column 1
1754
+ * grid.moveColumnById(0, 2); // Move column 0 to position before column 2 (column index 1)
1755
+ * grid.moveColumnById(0, 1); // Nothing is moved
1756
+ * grid.moveColumnById("sourceColumnId", "anotherId");
1757
+ * grid.moveColumnById("sourceColumnId", ""); // move to the last position
1758
+ */
1759
+ Core.prototype.moveColumnById = function (srcCol, destCol) {
1760
+ var colCount = this.getColumnCount();
1761
+ var srcIndex = this.getColumnIndex(srcCol);
1762
+ if(srcIndex < 0 || srcIndex >= colCount) {
1763
+ return false;
1764
+ }
1765
+ var destIndex = destCol != null ? this.getColumnIndex(destCol) : -1;
1766
+ if(destIndex < 0) {
1767
+ destIndex = colCount;
1768
+ }
1769
+ return this._moveColumnByIndex(srcIndex, destIndex);
1770
+ };
1771
+ /** Move column without verification for better performance
1772
+ * @private
1773
+ * @param {number} srcIndex Column index
1774
+ * @param {number} destIndex Column index of the destination
1775
+ * @return {boolean} Return true if there is any change, and false otherwise
1776
+ */
1777
+ Core.prototype._moveColumnByIndex = function (srcIndex, destIndex) {
1778
+ if(srcIndex < destIndex) { // Ensure that the source column is put in front of the destination index
1779
+ --destIndex;
1780
+ }
1781
+ if(srcIndex === destIndex) {
1782
+ return false;
1783
+ }
1784
+ return this.moveColumn(srcIndex, destIndex);
1785
+ };
1786
+ /** @public
1787
+ * @param {number|string|Array.<number|string>} colRefs List of column index or column id to be moved
1788
+ * @param {(number|string)=} destCol Destination position where the moved columns will be placed BEFORE the specified position. This can be column id or index
1789
+ * @return {boolean} Return true if there is any change, and false otherwise
1790
+ */
1791
+ Core.prototype.reorderColumns = function (colRefs, destCol) {
1792
+ var destId = "";
1793
+ if(typeof destCol === "number") {
1794
+ destId = this.getColumnId(destCol);
1795
+ } else if(destCol) {
1796
+ destId = destCol;
1797
+ }
1798
+
1799
+ if(Array.isArray(colRefs)) {
1800
+ var srcLen = colRefs.length;
1801
+ if(srcLen > 1) {
1802
+ var colIds = this.getColumnIds();
1803
+ var colCount = colIds.length;
1804
+ var srcIds = [];
1805
+ var invalidDest = false;
1806
+ var i, srcId, srcIdx;
1807
+ for(i = 0; i < srcLen; ++i) {
1808
+ var colRef = colRefs[i];
1809
+ if(typeof colRef === "number") {
1810
+ srcIdx = colRef;
1811
+ srcId = colIds[colRef] || "";
1812
+ } else {
1813
+ srcId = colRef;
1814
+ srcIdx = colIds.indexOf(srcId);
1815
+ }
1816
+ if(srcId && srcIdx >= 0) {
1817
+ srcIds.push(srcId);
1818
+ if(destId === srcId) {
1819
+ invalidDest = true; // Destination must not exist in source columns
1820
+ }
1821
+ }
1822
+ }
1823
+
1824
+ var destIdx;
1825
+ srcLen = srcIds.length;
1826
+ if(invalidDest) { // Find the next valid destination where it is not contained in the source columns
1827
+ destIdx = this.getColumnIndex(destId);
1828
+ if(destIdx >= 0) {
1829
+ while(++destIdx < colCount) {
1830
+ destId = colIds[destIdx];
1831
+ if(srcIds.indexOf(destId) < 0) {
1832
+ break;
1833
+ }
1834
+ }
1835
+ }
1836
+ if(destIdx < 0 || destIdx >= colCount) {
1837
+ destId = "";
1838
+ }
1839
+ }
1840
+
1841
+ var dirty = 0;
1842
+ for(i = srcLen; --i >= 0;) {
1843
+ srcId = srcIds[i]; // Only valid source columns are left at this point
1844
+ srcIdx = this.getColumnIndex(srcId);
1845
+ destIdx = this.getColumnIndex(destId);
1846
+ if(destIdx < 0) { // Insert to the back when id is not found
1847
+ destIdx = colCount;
1848
+ }
1849
+ dirty |= this._moveColumnByIndex(srcIdx, destIdx);
1850
+ destId = srcId;
1851
+ }
1852
+ return dirty ? true : false;
1853
+ } else {
1854
+ return this.moveColumnById(colRefs[0], destId);
1855
+ }
1856
+ }
1857
+
1858
+ if(colRefs != null) {
1859
+ // colRefs will be a number or string
1860
+ return this.moveColumnById(colRefs, destId);
1861
+ }
1862
+ return false;
1863
+ };
1864
+
1739
1865
  /** @public
1740
1866
  * @ignore
1741
1867
  * @return {!TrackLayout}
@@ -1787,9 +1913,14 @@ Core.prototype._deserializeColumn = function (index, jsonObj) {
1787
1913
  var colId = jsonObj["id"];
1788
1914
  if(colId && typeof colId === "string") {
1789
1915
  colDef["id"] = colId; // WARNING: We do not guarantee uniqueness of user id
1916
+ colDef["userId"] = colId;
1917
+ }
1918
+ var field = jsonObj["field"];
1919
+ if(field && typeof field === "string") {
1920
+ colDef["field"] = field;
1790
1921
  }
1791
1922
 
1792
- var value = jsonObj["dataColumnName"];
1923
+ var value = jsonObj["dataColumnName"]; // Deprecated
1793
1924
  if (value != null) {
1794
1925
  colDef["dataColumnName"] = value;
1795
1926
  }
@@ -3232,24 +3363,6 @@ Core.prototype.getRelativePosition = function (obj, context) {
3232
3363
  return ret_obj;
3233
3364
  };
3234
3365
 
3235
- /** Find column index by column id or data column name
3236
- * @public
3237
- * @param {string} str Column id or data column name
3238
- * @return {number} Return negative value if there is no match
3239
- */
3240
- Core.prototype.getColumnIndex = function (str) {
3241
- if(str) {
3242
- var colCount = this.getColumnCount();
3243
- for(var c = 0; c < colCount; ++c) {
3244
- var colDef = this._getColumnDef(c);
3245
- if(str === colDef["id"] || str === colDef["dataColumnName"]) {
3246
- return c;
3247
- }
3248
- }
3249
- }
3250
- return -1;
3251
- };
3252
-
3253
3366
  /** @public
3254
3367
  * @return {!ElementWrapper}
3255
3368
  */
@@ -4848,6 +4961,99 @@ Core.prototype.getColumnIds = function () {
4848
4961
  return ary;
4849
4962
  };
4850
4963
 
4964
+ /** @public
4965
+ * @param {number} colIndex
4966
+ * @param {string} field
4967
+ */
4968
+ Core.prototype.setColumnField = function (colIndex, field) {
4969
+ this._getColumnDef(colIndex)["field"] = field || "";
4970
+ };
4971
+ /** @public
4972
+ * @param {number} colIndex
4973
+ * @return {string} Return empty string if the specified column does not exist
4974
+ */
4975
+ Core.prototype.getColumnField = function (colIndex) {
4976
+ if(colIndex >= 0 && colIndex < this.getColumnCount()) {
4977
+ return this._getColumnDef(colIndex)["field"] || "";
4978
+ }
4979
+ return "";
4980
+ };
4981
+ /** @public
4982
+ * @return {!Array.<string>} Return all column ids from existing column
4983
+ */
4984
+ Core.prototype.getColumnFields = function () {
4985
+ var colCount = this.getColumnCount();
4986
+ var ary = new Array(colCount);
4987
+ for(var c = 0; c < colCount; ++c) {
4988
+ ary[c] = this._getColumnDef(c)["field"] || "";
4989
+ }
4990
+ return ary;
4991
+ };
4992
+
4993
+ /** Get column index by column id or column field
4994
+ * @public
4995
+ * @param {string|number} colRef Column id or data column name
4996
+ * @return {number} Return negative value if there is no match
4997
+ */
4998
+ Core.prototype.getColumnIndex = function (colRef) {
4999
+ if(typeof colRef === "number") {
5000
+ return colRef;
5001
+ } else if(colRef) {
5002
+ var str = colRef;
5003
+ var colCount = this.getColumnCount();
5004
+ for(var c = 0; c < colCount; ++c) {
5005
+ var colDef = this._getColumnDef(c);
5006
+ if(str === colDef["id"] || str === colDef["field"]) {
5007
+ return c;
5008
+ }
5009
+ }
5010
+ }
5011
+ return -1;
5012
+ };
5013
+ /** Any invalid column reference will be excluded from the output array
5014
+ * @public
5015
+ * @param {Array.<number|string>} colRefs
5016
+ * @return {!Array.<number>} Return negative value if there is no match
5017
+ */
5018
+ Core.prototype.getColumnIndices = function (colRefs) {
5019
+ var ary = [];
5020
+ var colCount = this.getColumnCount();
5021
+ var inputAry = Array.isArray(colRefs) ? colRefs : [colRefs];
5022
+ var len = inputAry.length;
5023
+ // Verify user input
5024
+ for(var i = 0; i < len; ++i) {
5025
+ var colIndex = this.getColumnIndex(inputAry[i]);
5026
+ if(colIndex >= 0 && colIndex < colCount) {
5027
+ ary.push(colIndex); // WARNING: We have not check for duplication
5028
+ }
5029
+ }
5030
+ return ary;
5031
+ };
5032
+
5033
+ /** Get a map from column id and field to column index. This should be useful when finding multiple column indices.
5034
+ * @public
5035
+ * @return {!Object.<string, number>}
5036
+ */
5037
+ Core.prototype.getColumnIndexMap = function () {
5038
+ var colCount = this.getColumnCount();
5039
+ var obj = {};
5040
+ var str = "";
5041
+ for(var c = 0; c < colCount; ++c) {
5042
+ var colDef = this._getColumnDef(c);
5043
+
5044
+ str = colDef["field"];
5045
+ if(str) {
5046
+ obj[str] = c;
5047
+ }
5048
+
5049
+ str = colDef["id"];
5050
+ if(str) {
5051
+ obj[str] = c;
5052
+ }
5053
+ }
5054
+ return obj;
5055
+ };
5056
+
4851
5057
 
4852
5058
  /** @private */
4853
5059
  Core.prototype._onWindowResize = function() {
@@ -1317,6 +1317,12 @@ Scrollbar.prototype.getDefaultMouseWheelLogic = function () {
1317
1317
  * @param {Event} e
1318
1318
  */
1319
1319
  Scrollbar.prototype._onMouseWheel = function (e) {
1320
+
1321
+ // Blacklist for prevent triggering the scrollbar when the dialog is opened.
1322
+ if(e.target.opened) { // get attribute method doesn't work in elf element
1323
+ return;
1324
+ }
1325
+
1320
1326
  if (this._isFrozen) {
1321
1327
  Util._preventDefault(e);
1322
1328
  return;
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.26" };
3
+ window.EFX_GRID = { version: "6.0.28" };
@@ -700,7 +700,14 @@ RowSegmentingPlugin.prototype.fillSegments = function() {
700
700
  RowSegmentingPlugin.prototype.addSegmentChild = function(segmentRef, rowRef) {
701
701
  var dv = this._getDataView();
702
702
  if(dv) {
703
- dv.addSegmentChild(segmentRef, rowRef);
703
+ var dataId;
704
+ if(this._realTimeGrid) {
705
+ var rowDef = this._realTimeGrid.getRowDefinition(rowRef);
706
+ if(rowDef) {
707
+ dataId = rowDef.getDataId();
708
+ }
709
+ }
710
+ dv.addSegmentChild(segmentRef, rowRef, dataId);
704
711
  }
705
712
  };
706
713
  /** @public
@@ -710,7 +717,19 @@ RowSegmentingPlugin.prototype.addSegmentChild = function(segmentRef, rowRef) {
710
717
  RowSegmentingPlugin.prototype.addSegmentChildren = function(segmentRef, rowRefs) {
711
718
  var dv = this._getDataView();
712
719
  if(dv) {
713
- dv.addSegmentChildren(segmentRef, rowRefs);
720
+ var dataIds;
721
+ if(this._realTimeGrid) {
722
+ rowRefs = Array.isArray(rowRefs) ? rowRefs : [rowRefs];
723
+ var len = rowRefs.length;
724
+ dataIds = new Array(len);
725
+ for(var i = 0; i < len; i++) {
726
+ var rowDef = this._realTimeGrid.getRowDefinition(rowRefs[i]);
727
+ if(rowDef) {
728
+ dataIds[i] = rowDef.getDataId();
729
+ }
730
+ }
731
+ }
732
+ dv.addSegmentChildren(segmentRef, rowRefs, dataIds);
714
733
  }
715
734
  };
716
735
  /** @public