@refinitiv-ui/efx-grid 6.0.81 → 6.0.82

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.81" };
3
+ window.EFX_GRID = { version: "6.0.82" };
@@ -829,6 +829,9 @@ ColumnSelectionPlugin.prototype._onClick = function (e) {
829
829
  return;
830
830
  }
831
831
 
832
+ var cIndex = info["colIndex"];
833
+ var prevSel = this.isSelectedColumn(cIndex);
834
+
832
835
  if (e.button === 2) {
833
836
  // Right button
834
837
  if (e.type === "click") {
@@ -837,12 +840,11 @@ ColumnSelectionPlugin.prototype._onClick = function (e) {
837
840
  } // To allow right clicking at the content for context menu and multi column selection
838
841
 
839
842
 
840
- if (this.isSelectedColumn(info["colIndex"])) {
843
+ if (prevSel) {
841
844
  return;
842
845
  }
843
846
  }
844
847
 
845
- var cIndex = info["colIndex"];
846
848
  var isNewGridClicked = !this._activeGrid || this._activeGrid !== host;
847
849
  var groupId = info["groupId"];
848
850
  var childIndices, childCount;
@@ -859,9 +861,9 @@ ColumnSelectionPlugin.prototype._onClick = function (e) {
859
861
  }
860
862
 
861
863
  if (e.ctrlKey || e.metaKey) {
862
- if (!groupId && (!this._singleSelMode || this.isSelectedColumn(cIndex))) {
863
- this.setSelectedColumn(cIndex, !this.isSelectedColumn(cIndex));
864
- this._anchorCol = this.isSelectedColumn(cIndex) ? cIndex : this.getFirstSelectedColumn();
864
+ if (!groupId && (!this._singleSelMode || prevSel)) {
865
+ this.setSelectedColumn(cIndex, !prevSel);
866
+ this._anchorCol = prevSel ? cIndex : this.getFirstSelectedColumn();
865
867
  } else {
866
868
  var newState = !this._isSelectedColumns(childIndices);
867
869
 
@@ -915,6 +917,10 @@ ColumnSelectionPlugin.prototype._onClick = function (e) {
915
917
  if (this._anchorCol < 0) {
916
918
  this._hasSelection = false;
917
919
  this._activeGrid = this._hosts[0] || null; // Maintain selectability even if there is no selection
920
+ } else {
921
+ if (this._activeGrid && !prevSel) {
922
+ this._activeGrid.focus();
923
+ }
918
924
  }
919
925
 
920
926
  this._dispatchSelectionChanged(e, cIndex);
package/lib/versions.json CHANGED
@@ -12,7 +12,7 @@
12
12
  "tr-grid-column-formatting": "0.9.35",
13
13
  "tr-grid-column-grouping": "1.0.57",
14
14
  "tr-grid-column-resizing": "1.0.28",
15
- "tr-grid-column-selection": "1.0.32",
15
+ "tr-grid-column-selection": "1.0.33",
16
16
  "tr-grid-column-stack": "1.0.74",
17
17
  "tr-grid-conditional-coloring": "1.0.68",
18
18
  "tr-grid-content-wrap": "1.0.20",
package/package.json CHANGED
@@ -66,5 +66,5 @@
66
66
  "publishConfig": {
67
67
  "access": "public"
68
68
  },
69
- "version": "6.0.81"
69
+ "version": "6.0.82"
70
70
  }