@trudb/tru-common-lib 0.1.984 → 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.
@@ -5849,8 +5849,9 @@ class TruDataGridCellRenderer {
5849
5849
  e.target.classList.contains('invalid-flag') ? this.validationContainer.classList.toggle('show') : this.validationContainer.classList.remove('show');
5850
5850
  };
5851
5851
  onRightClick = (event) => {
5852
+ event.stopPropagation();
5852
5853
  event.preventDefault();
5853
- alert('Test');
5854
+ alert('Cell Clicked');
5854
5855
  };
5855
5856
  init(params) {
5856
5857
  params.eGridCell.innerHTML = '';
@@ -5873,7 +5874,7 @@ class TruDataGridCellRenderer {
5873
5874
  params.eGridCell.appendChild(this.validationContainer);
5874
5875
  params.eGridCell.appendChild(validationFlag);
5875
5876
  params.eGridCell.addEventListener('mouseover', this.onMouseOver);
5876
- params.eGridCell.addEventListener('contextmenu', this.onMouseOver);
5877
+ params.eGridCell.addEventListener('contextmenu', this.onRightClick);
5877
5878
  Object.assign(params.eGridCell.style, new TruUtil().rulesEval(params.data[params.colDef.field].rules(params.data.$entity)));
5878
5879
  }
5879
5880
  getGui() {
@@ -5890,6 +5891,11 @@ class TruDataGridCellRenderer {
5890
5891
  class TruDataGridPkeyCellRenderer {
5891
5892
  // private eGui: is an empty element to satisfy the getGui method.
5892
5893
  eGui;
5894
+ onRightClick = (event) => {
5895
+ event.stopPropagation();
5896
+ event.preventDefault();
5897
+ alert('Right Cell Clicked');
5898
+ };
5893
5899
  init(params) {
5894
5900
  params.eGridCell.innerHTML = '';
5895
5901
  let value = params.value;
@@ -5897,6 +5903,7 @@ class TruDataGridPkeyCellRenderer {
5897
5903
  value = 'NEW';
5898
5904
  var content = document.createTextNode(value);
5899
5905
  params.eGridCell.appendChild(content);
5906
+ params.eGridCell.addEventListener('contextmenu', this.onRightClick);
5900
5907
  }
5901
5908
  getGui() {
5902
5909
  return this.eGui;