@refinitiv-ui/efx-grid 6.0.58 → 6.0.59

Sign up to get free protection for your applications and to get access to all the features.
@@ -562,7 +562,7 @@ Core.prototype._batches = null;
562
562
  * @return {string}
563
563
  */
564
564
  Core.getVersion = function () {
565
- return "5.1.73";
565
+ return "5.1.74";
566
566
  };
567
567
  /** {@link ElementWrapper#dispose}
568
568
  * @override
@@ -781,9 +781,9 @@ SortableTitlePlugin.prototype.sortColumns = function (sortOptions, opt_arg) {
781
781
  var states = [];
782
782
  for (var i = 0; i < sortOptions.length; i++) {
783
783
  var opt = sortOptions[i];
784
- var colRef = opt["colIndex"];
785
- if(colRef < 0 || colRef == null) {
786
- colRef = opt["colId"] || opt["field"];
784
+ var colRef = opt["colId"] || opt["field"];
785
+ if(colRef == null) {
786
+ colRef = opt["colIndex"];
787
787
  }
788
788
  var state = this._prepareSorting(
789
789
  colRef,
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.58" };
3
+ window.EFX_GRID = { version: "6.0.59" };
@@ -45767,16 +45767,16 @@ Grid.prototype.replaceColumn = function (columnOption, colRef) {
45767
45767
  }
45768
45768
 
45769
45769
  var colDef = this.getColumnDefinition(colIndex);
45770
- if(colDef.getChildren()) { // Parent time series field doesn't provide hidden property
45770
+ if(colDef && colDef.getChildren().length > 0) { // Parent time series field doesn't provide hidden property
45771
45771
  colConfig["hidden"] = false;
45772
45772
  }
45773
45773
 
45774
- if(colConfig.id == null) {
45774
+ if(colDef && colConfig.id == null) {
45775
45775
  colConfig.id = colDef.getId(); // retain ID
45776
45776
  }
45777
45777
  this._grid.startBatch("reset");
45778
+ this.removeColumn(colIndex);
45778
45779
  this.insertColumn(colConfig, colIndex);
45779
- this.removeColumn(colIndex + 1); // remove existing column after insert
45780
45780
  this._grid.stopBatch("reset");
45781
45781
  };
45782
45782
 
@@ -46481,9 +46481,9 @@ Grid.prototype._initDuplicateRicData = function(rowDef) {
46481
46481
  }
46482
46482
  };
46483
46483
  /** @public
46484
- * @param {Object=} rowOption
46484
+ * @param {(RowDefinition~Options|string)=} rowOption
46485
46485
  * @param {Grid~RowReference=} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
46486
- * @returns {Object}
46486
+ * @returns {RowDefinition}
46487
46487
  * @example
46488
46488
  * var grid = new rt.Grid(grid_div, options);
46489
46489
  * grid.insertRow({"ric": "RIC"}, 0); // A new row is added at the top
@@ -46514,7 +46514,7 @@ Grid.prototype.insertRow = function(rowOption, rowRef) {
46514
46514
  return rowDef;
46515
46515
  };
46516
46516
  /** @public
46517
- * @param {Array.<Object>} rowOptions Array of row option object
46517
+ * @param {Array.<RowDefinition~Options|string>} rowOptions Array of row option object
46518
46518
  * @param {Grid~RowReference=} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
46519
46519
  * @param {Array.<string>=} opt_fields
46520
46520
  * @example
@@ -48164,8 +48164,8 @@ Grid.prototype._logData = function(rowDefs, options) {
48164
48164
  /** @public
48165
48165
  * @description Replace existing row with a new row. Row ID would be changed, after row is replaced.
48166
48166
  * @param {Grid~RowReference} rowRef Reference (i.e. row index, row id, or row definition) of the insert position
48167
- * @param {Object=} rowOption
48168
- * @returns {Object}
48167
+ * @param {(RowDefinition~Options|string)=} rowOption
48168
+ * @returns {RowDefinition}
48169
48169
  */
48170
48170
  Grid.prototype.replaceRow = function(rowRef, rowOption) {
48171
48171
  var rowId = this._getRowId(rowRef);