@refinitiv-ui/efx-grid 6.0.95 → 6.0.96
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.
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +961 -963
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/RowDefinition.js +17 -9
- package/lib/versions.json +1 -1
- package/package.json +1 -1
@@ -367,14 +367,20 @@ RowDefinition.prototype.setContent = function(userInput, extractedOptions) {
|
|
367
367
|
let segmentId = "";
|
368
368
|
if(this._view) {
|
369
369
|
segmentId = this._view.getSegmentParentRowId(this._rowId);
|
370
|
-
if(
|
371
|
-
|
372
|
-
|
373
|
-
|
370
|
+
if(segmentId) {
|
371
|
+
if(this._isChain){ // If the row was a normal row and has been changed to a chain, remove it from existing segment
|
372
|
+
let targetRowId = _getEndOfSegmentRowId(this._view, this._rowId);
|
373
|
+
this._view.removeSegmentChild(segmentId, this._rowId);
|
374
|
+
this._view.moveRow(this._rowId, targetRowId);
|
374
375
|
|
375
|
-
|
376
|
+
segmentId = "";
|
377
|
+
}
|
378
|
+
} else if(this._view.getSegment(this._rowId)) {
|
379
|
+
this._view.setSegmentSeparator(this._rowId, false); // Remove existing segment
|
380
|
+
}
|
381
|
+
if(this._isChain) {
|
382
|
+
this._view.setSegmentSeparator(this._rowId, true);
|
376
383
|
}
|
377
|
-
this._view.setSegmentSeparator(this._rowId, !!this._isChain);
|
378
384
|
if(this.isChainCollapsed()) {
|
379
385
|
if(this._expanded){
|
380
386
|
this.expandChain();
|
@@ -956,7 +962,7 @@ RowDefinition.prototype.registerToView = function(view, rowId) {
|
|
956
962
|
if(!this._expanded) {
|
957
963
|
this.collapseChain();
|
958
964
|
}
|
959
|
-
} else if(parentRowId) {
|
965
|
+
} else if(!this._parent && parentRowId) { // Constituent cannot be added to another segment
|
960
966
|
view.addSegmentChild(parentRowId, this._rowId, this._dataId);
|
961
967
|
}
|
962
968
|
};
|
@@ -1049,13 +1055,15 @@ RowDefinition.prototype.addConstituent = function(ric) {
|
|
1049
1055
|
let rowId = this.getRowId();
|
1050
1056
|
// WARNING: insert position, we prioritize using CHILD_ORDER (From server) in dc first. If it does not exist, the last row of the segment will be pushed
|
1051
1057
|
let childOrder = childDef.getData("CHILD_ORDER");
|
1052
|
-
let
|
1058
|
+
let dt = this._view.getDataSource();
|
1059
|
+
|
1060
|
+
let parentIndex = dt.getRowIndex(rowId);
|
1053
1061
|
let position = parentIndex + this.getChildCount(); // push the last position
|
1054
1062
|
if(childOrder != null) {
|
1055
1063
|
// Warning: We need to carry a value of 1 because the CHILD_ORDER starts with 0, and it will be added to the parentIndex. In case the parent rowIndex is not included.
|
1056
1064
|
position = parentIndex + childOrder + 1; // insert between segment
|
1057
1065
|
} // else {} it will be push in the last row of segment
|
1058
|
-
childDef.registerToView(this._view,
|
1066
|
+
childDef.registerToView(this._view, dt.getRowId(position));
|
1059
1067
|
// TODO: Handle nested children
|
1060
1068
|
this._view.addSegmentChild(rowId, childDef.getRowId(), childDef.getDataId());
|
1061
1069
|
}
|
package/lib/versions.json
CHANGED
package/package.json
CHANGED