@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.
@@ -2370,10 +2370,10 @@ Grid.prototype.insertRow = function(rowOption, rowRef) {
2370
2370
  }
2371
2371
  }
2372
2372
  let rowDef = new RowDefinition(rowOption);
2373
+ rowDef.registerToView(this._dv, this._getRowId(rowRef));
2373
2374
  rowDef.setDataSource(this._dc, this._subs); // This could also subscribe chain index/ric to JET/RTK
2374
2375
  this._initDuplicateRicData(rowDef);
2375
2376
 
2376
- rowDef.registerToView(this._dv, this._getRowId(rowRef));
2377
2377
  if(rowOption && rowOption["hidden"]) {
2378
2378
  this._dv.hideRow(rowDef.getRowId()); // Try to obtain rowId in rowDef since rowId is not assigned when new rows are created.
2379
2379
  }
@@ -3945,12 +3945,9 @@ Grid.prototype._onDataComposed = function(e) {
3945
3945
  return; // Row could already be removed or global change event is sent
3946
3946
  }
3947
3947
 
3948
- let rowDef = rowData[ROW_DEF];
3948
+ let rowDef = this._getRowDefinitionById(e["rid"]);
3949
3949
  if(!rowDef) {
3950
- return;
3951
- }
3952
- if(!rowDef.getDataSource()) {
3953
- return; // Somehow, rowDef is invalid and doesn't have data source
3950
+ return; // Somehow the given row id is invalid
3954
3951
  }
3955
3952
 
3956
3953
  if(this._autoDateConversion) { // auto data conversion
@@ -4011,8 +4008,8 @@ Grid.prototype._onSubSegmentChanged = function(e) {
4011
4008
  rowDef = new RowDefinition({
4012
4009
  "segmentId": segmentId // WARNING: This could cause row id duplication
4013
4010
  });
4014
- rowDef.setDataSource(this._dc); // auto generated row does not require a subscription
4015
4011
  rowDef.registerToView(this._dv);
4012
+ rowDef.setDataSource(this._dc); // auto generated row does not require a subscription
4016
4013
  }
4017
4014
  };
4018
4015
 
@@ -610,7 +610,10 @@ RowDefinition.prototype.setDataSource = function(dataSource, subs) {
610
610
  this._dc = dataSource || null;
611
611
 
612
612
  if(this._dc) {
613
- this.setRowData(_cloneObject(this._staticValues)); // Trigger data change
613
+ this.setRowData({}); // Trigger data change
614
+ if(this._staticValues) {
615
+ this.setRowData(this._staticValues); // Trigger dataComposed and add updates
616
+ }
614
617
  }
615
618
 
616
619
  this._subs = subs || null;
@@ -736,9 +739,14 @@ RowDefinition.prototype.setRowData = function(data) {
736
739
  /** @public
737
740
  */
738
741
  RowDefinition.prototype.resetRowData = function() {
739
- if(this._dc) {
740
- this._dc.setRowData(this._rowId, null);
741
- this._dc.setRowData(this._rowId, _cloneObject(this._staticValues)); // Row data is guaranteed to be existed
742
+ let dc = this._dc;
743
+ if(dc) {
744
+ let rowId = this._rowId;
745
+ dc.setRowData(rowId, null);
746
+ dc.setRowData(rowId, {}); // Row data is guaranteed to be existed
747
+ if(this._staticValues) {
748
+ dc.setRowData(rowId, this._staticValues); // Trigger dataComposed and add updates
749
+ }
742
750
  }
743
751
  };
744
752
  /** @public
package/package.json CHANGED
@@ -69,5 +69,5 @@
69
69
  "publishConfig": {
70
70
  "access": "public"
71
71
  },
72
- "version": "6.0.127"
72
+ "version": "6.0.128"
73
73
  }