@refinitiv-ui/efx-grid 6.0.73 → 6.0.74
Sign up to get free protection for your applications and to get access to all the features.
- package/lib/grid/index.js +1 -1
- package/lib/rt-grid/dist/rt-grid.js +36 -31
- package/lib/rt-grid/dist/rt-grid.min.js +1 -1
- package/lib/rt-grid/es6/Grid.js +34 -29
- package/lib/tr-grid-cell-selection/es6/CellSelection.d.ts +2 -0
- package/lib/tr-grid-cell-selection/es6/CellSelection.js +19 -0
- package/lib/tr-grid-range-bar/es6/RangeBar.js +20 -3
- package/lib/versions.json +2 -2
- package/package.json +1 -1
package/lib/grid/index.js
CHANGED
@@ -36235,7 +36235,7 @@ Core.prototype._firstRendered = false;
|
|
36235
36235
|
* @return {string}
|
36236
36236
|
*/
|
36237
36237
|
Core.getVersion = function () {
|
36238
|
-
return "5.1.
|
36238
|
+
return "5.1.81";
|
36239
36239
|
};
|
36240
36240
|
/** {@link ElementWrapper#dispose}
|
36241
36241
|
* @override
|
@@ -41106,7 +41106,7 @@ Core.prototype._onRowHeightChanged = function (e) {
|
|
41106
41106
|
// TODO: Set row height one by one is not good
|
41107
41107
|
for(var j = 0; j < len; ++j) {
|
41108
41108
|
var evt = evts[j];
|
41109
|
-
var section = /** @type {ILayoutGrid} */(evt["
|
41109
|
+
var section = /** @type {ILayoutGrid} */(evt["section"]);
|
41110
41110
|
if(!this._containsSection(section)) {
|
41111
41111
|
continue; // The section is no longer contained in this grid
|
41112
41112
|
}
|
@@ -46757,6 +46757,32 @@ Grid.prototype.updateDataSet = function(records, rowIdentifier) {
|
|
46757
46757
|
}
|
46758
46758
|
}
|
46759
46759
|
}
|
46760
|
+
|
46761
|
+
var idMap = {};
|
46762
|
+
var newDataMap = {};
|
46763
|
+
for (i = recordCount - 1; i >= 0; i--) {
|
46764
|
+
record = records[i];
|
46765
|
+
id = record[rowIdentifier];
|
46766
|
+
rowDef = oldDataMap[id];
|
46767
|
+
newDataMap[id] = record; // Assign a new data map to compare to the previous data
|
46768
|
+
record[fieldSorting] = i;
|
46769
|
+
if(idMap[id]) { // Prevent assign data in duplicate row
|
46770
|
+
continue;
|
46771
|
+
}
|
46772
|
+
idMap[id] = true;
|
46773
|
+
if (!rowDef) {
|
46774
|
+
this.insertRow({ values: record}); // Insert last position
|
46775
|
+
} else {
|
46776
|
+
rowDef.setRowData(record);
|
46777
|
+
}
|
46778
|
+
}
|
46779
|
+
// Check Remove previous data
|
46780
|
+
for (var rowIdentifierName in oldDataMap) {
|
46781
|
+
if (oldDataMap[rowIdentifierName] && !newDataMap[rowIdentifierName]) {
|
46782
|
+
this.removeRow(oldDataMap[rowIdentifierName]); // Slow
|
46783
|
+
}
|
46784
|
+
}
|
46785
|
+
this._dt.sortOnce(ROW_DEF, "a", compareNumber, fieldSorting);
|
46760
46786
|
} else {
|
46761
46787
|
for (i = 0; i < rowDefCount; i++) {
|
46762
46788
|
record = records[i];
|
@@ -46766,38 +46792,17 @@ Grid.prototype.updateDataSet = function(records, rowIdentifier) {
|
|
46766
46792
|
this.removeRow(rowDefs[i]); // Need to use rowRef, can't use index in view
|
46767
46793
|
}
|
46768
46794
|
}
|
46769
|
-
}
|
46770
|
-
|
46771
|
-
// Check Update and Insert
|
46772
|
-
var idMap = {};
|
46773
|
-
var newDataMap = {};
|
46774
|
-
for (i = recordCount - 1; i >= 0; i--) {
|
46775
|
-
record = records[i];
|
46776
|
-
id = rowIdentifier ? record[rowIdentifier] : i;
|
46777
|
-
rowDef = oldDataMap[id];
|
46778
|
-
newDataMap[id] = record; // Assign a new data map to compare to the previous data
|
46779
|
-
record[fieldSorting] = i;
|
46780
|
-
if(idMap[id]) { // Prevent assign data in duplicate row
|
46781
|
-
continue;
|
46782
|
-
}
|
46783
|
-
idMap[id] = true;
|
46784
|
-
if (!rowDef) {
|
46785
|
-
this.insertRow({ values: record}); // Insert last position
|
46786
|
-
} else {
|
46787
|
-
rowDef.setRowData(record);
|
46788
|
-
}
|
46789
|
-
}
|
46790
46795
|
|
46791
|
-
|
46792
|
-
|
46793
|
-
|
46794
|
-
|
46796
|
+
for (i = 0; i < recordCount; i++) { // It will be sort by index when insert / update
|
46797
|
+
record = records[i];
|
46798
|
+
rowDef = oldDataMap[i];
|
46799
|
+
if (!rowDef) {
|
46800
|
+
this.insertRow({ values: record}); // Insert last position
|
46801
|
+
} else {
|
46802
|
+
rowDef.setRowData(record);
|
46803
|
+
}
|
46795
46804
|
}
|
46796
46805
|
}
|
46797
|
-
|
46798
|
-
if(rowIdentifier) {
|
46799
|
-
this._dt.sortOnce(ROW_DEF, "a", compareNumber, fieldSorting);
|
46800
|
-
}
|
46801
46806
|
};
|
46802
46807
|
/** @private
|
46803
46808
|
* @param {Array|Object} item
|