@refinitiv-ui/efx-grid 6.0.127 → 6.0.128

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 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.127" };
3
+ window.EFX_GRID = { version: "6.0.128" };
@@ -13249,7 +13249,10 @@ RowDefinition.prototype.setDataSource = function(dataSource, subs) {
13249
13249
  this._dc = dataSource || null;
13250
13250
 
13251
13251
  if(this._dc) {
13252
- this.setRowData(_cloneObject(this._staticValues)); // Trigger data change
13252
+ this.setRowData({}); // Trigger data change
13253
+ if(this._staticValues) {
13254
+ this.setRowData(this._staticValues); // Trigger dataComposed and add updates
13255
+ }
13253
13256
  }
13254
13257
 
13255
13258
  this._subs = subs || null;
@@ -13375,9 +13378,14 @@ RowDefinition.prototype.setRowData = function(data) {
13375
13378
  /** @public
13376
13379
  */
13377
13380
  RowDefinition.prototype.resetRowData = function() {
13378
- if(this._dc) {
13379
- this._dc.setRowData(this._rowId, null);
13380
- this._dc.setRowData(this._rowId, _cloneObject(this._staticValues)); // Row data is guaranteed to be existed
13381
+ let dc = this._dc;
13382
+ if(dc) {
13383
+ let rowId = this._rowId;
13384
+ dc.setRowData(rowId, null);
13385
+ dc.setRowData(rowId, {}); // Row data is guaranteed to be existed
13386
+ if(this._staticValues) {
13387
+ dc.setRowData(rowId, this._staticValues); // Trigger dataComposed and add updates
13388
+ }
13381
13389
  }
13382
13390
  };
13383
13391
  /** @public
@@ -46974,10 +46982,10 @@ Grid.prototype.insertRow = function(rowOption, rowRef) {
46974
46982
  }
46975
46983
  }
46976
46984
  let rowDef = new RowDefinition(rowOption);
46985
+ rowDef.registerToView(this._dv, this._getRowId(rowRef));
46977
46986
  rowDef.setDataSource(this._dc, this._subs); // This could also subscribe chain index/ric to JET/RTK
46978
46987
  this._initDuplicateRicData(rowDef);
46979
46988
 
46980
- rowDef.registerToView(this._dv, this._getRowId(rowRef));
46981
46989
  if(rowOption && rowOption["hidden"]) {
46982
46990
  this._dv.hideRow(rowDef.getRowId()); // Try to obtain rowId in rowDef since rowId is not assigned when new rows are created.
46983
46991
  }
@@ -48549,12 +48557,9 @@ Grid.prototype._onDataComposed = function(e) {
48549
48557
  return; // Row could already be removed or global change event is sent
48550
48558
  }
48551
48559
 
48552
- let rowDef = rowData[ROW_DEF];
48560
+ let rowDef = this._getRowDefinitionById(e["rid"]);
48553
48561
  if(!rowDef) {
48554
- return;
48555
- }
48556
- if(!rowDef.getDataSource()) {
48557
- return; // Somehow, rowDef is invalid and doesn't have data source
48562
+ return; // Somehow the given row id is invalid
48558
48563
  }
48559
48564
 
48560
48565
  if(this._autoDateConversion) { // auto data conversion
@@ -48615,8 +48620,8 @@ Grid.prototype._onSubSegmentChanged = function(e) {
48615
48620
  rowDef = new RowDefinition({
48616
48621
  "segmentId": segmentId // WARNING: This could cause row id duplication
48617
48622
  });
48618
- rowDef.setDataSource(this._dc); // auto generated row does not require a subscription
48619
48623
  rowDef.registerToView(this._dv);
48624
+ rowDef.setDataSource(this._dc); // auto generated row does not require a subscription
48620
48625
  }
48621
48626
  };
48622
48627