@trudb/tru-common-lib 0.1.985 → 0.1.986

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.
@@ -5851,7 +5851,7 @@ class TruDataGridCellRenderer {
5851
5851
  onRightClick = (event) => {
5852
5852
  event.stopPropagation();
5853
5853
  event.preventDefault();
5854
- alert('Test');
5854
+ alert('Cell Clicked');
5855
5855
  };
5856
5856
  init(params) {
5857
5857
  params.eGridCell.innerHTML = '';
@@ -5874,7 +5874,7 @@ class TruDataGridCellRenderer {
5874
5874
  params.eGridCell.appendChild(this.validationContainer);
5875
5875
  params.eGridCell.appendChild(validationFlag);
5876
5876
  params.eGridCell.addEventListener('mouseover', this.onMouseOver);
5877
- params.eGridCell.addEventListener('contextmenu', this.onMouseOver);
5877
+ params.eGridCell.addEventListener('contextmenu', this.onRightClick);
5878
5878
  Object.assign(params.eGridCell.style, new TruUtil().rulesEval(params.data[params.colDef.field].rules(params.data.$entity)));
5879
5879
  }
5880
5880
  getGui() {
@@ -5891,6 +5891,11 @@ class TruDataGridCellRenderer {
5891
5891
  class TruDataGridPkeyCellRenderer {
5892
5892
  // private eGui: is an empty element to satisfy the getGui method.
5893
5893
  eGui;
5894
+ onRightClick = (event) => {
5895
+ event.stopPropagation();
5896
+ event.preventDefault();
5897
+ alert('Right Cell Clicked');
5898
+ };
5894
5899
  init(params) {
5895
5900
  params.eGridCell.innerHTML = '';
5896
5901
  let value = params.value;
@@ -5898,6 +5903,7 @@ class TruDataGridPkeyCellRenderer {
5898
5903
  value = 'NEW';
5899
5904
  var content = document.createTextNode(value);
5900
5905
  params.eGridCell.appendChild(content);
5906
+ params.eGridCell.addEventListener('contextmenu', this.onRightClick);
5901
5907
  }
5902
5908
  getGui() {
5903
5909
  return this.eGui;
@@ -7395,7 +7401,7 @@ class TruDataGrid {
7395
7401
  this.validationDialog.destroy();
7396
7402
  }
7397
7403
  onRightClick(event) {
7398
- //event.preventDefault();
7404
+ event.preventDefault();
7399
7405
  }
7400
7406
  onSearch = (setupQuery) => {
7401
7407
  this.firstSearchRan = true;