@trudb/tru-common-lib 0.2.4 → 0.2.6

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.
@@ -5896,19 +5896,16 @@ class TruDataGridPkeyCellRenderer {
5896
5896
  eGui;
5897
5897
  onRightClick = (event) => {
5898
5898
  event.preventDefault();
5899
- this.contextMenuPosition.x = event.clientX + 'px';
5899
+ this.contextMenuPosition.x = (27 + event.clientX) + 'px';
5900
5900
  this.contextMenuPosition.y = event.clientY + 'px';
5901
5901
  this.contextMenu.menu?.focusFirstItem('mouse');
5902
5902
  this.contextMenu.openMenu();
5903
5903
  };
5904
5904
  agInit(params) {
5905
5905
  this.params = params;
5906
- //params.eGridCell.innerHTML = '';
5907
- //let value = params.value;
5908
- //if (params.value < 0)
5909
- // value = 'NEW';
5910
- //var content = document.createTextNode(value);
5911
- //params.eGridCell.appendChild(content);
5906
+ let value = params.value;
5907
+ if (params.value < 0)
5908
+ value = 'NEW';
5912
5909
  params.eGridCell.addEventListener('contextmenu', this.onRightClick);
5913
5910
  }
5914
5911
  getGui() {
@@ -7515,15 +7512,17 @@ class TruDataGrid {
7515
7512
  };
7516
7513
  onRemove = () => {
7517
7514
  let selectedRows = this.api.getSelectedRows();
7518
- let filteredRows = [];
7519
- this.api.forEachNodeAfterFilter(node => {
7520
- filteredRows.push(node.data);
7521
- });
7522
- if (filteredRows.length)
7523
- this.rowData = filteredRows;
7524
- else
7525
- this.rowData = [];
7526
7515
  this.api.applyTransaction({ remove: selectedRows });
7516
+ setTimeout(() => {
7517
+ let filteredRows = [];
7518
+ this.api.forEachNodeAfterFilter(node => {
7519
+ filteredRows.push(node.data);
7520
+ });
7521
+ if (filteredRows.length)
7522
+ this.rowData = filteredRows;
7523
+ else
7524
+ this.rowData = [];
7525
+ });
7527
7526
  };
7528
7527
  onExport = () => {
7529
7528
  this.exportData();