@tetacom/ng-components 1.0.63 → 1.0.64

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.
@@ -9890,40 +9890,43 @@ class TableComponent {
9890
9890
  }
9891
9891
  handleClickOutsideAnyRow(event) {
9892
9892
  const coordinates = this.getCoordinates(event);
9893
- if (coordinates) {
9894
- this.cellClick.emit({
9895
- ...this._svc.getCellInstance(coordinates),
9896
- event
9897
- });
9898
- if (this.editEvent === EditEvent.click) {
9899
- this.startEditRowOrCell(coordinates);
9900
- }
9901
- else {
9902
- if (this._svc.currentEditCell && (coordinates.row !== this._svc.currentEditCell.row || coordinates.column !== this._svc.currentEditCell.column)) {
9903
- this.startEditRowOrCell(null);
9904
- }
9905
- }
9906
- }
9907
9893
  const row = this.getRow(event);
9908
- if (row) {
9909
- if (event.ctrlKey) {
9910
- this._svc.selectOrDeselectRow(row);
9911
- }
9912
- else if (event.shiftKey) {
9913
- this._svc.selectRange(row);
9914
- }
9915
- else {
9916
- this._svc.selectRows([row]);
9894
+ const eventIsOnRow = this.eventIsOnRow(event);
9895
+ setTimeout(() => {
9896
+ if (coordinates) {
9897
+ this.cellClick.emit({
9898
+ ...this._svc.getCellInstance(coordinates),
9899
+ event
9900
+ });
9901
+ if (this.editEvent === EditEvent.click) {
9902
+ this.startEditRowOrCell(coordinates);
9903
+ }
9904
+ else {
9905
+ if (this._svc.currentEditCell && (coordinates.row !== this._svc.currentEditCell.row || coordinates.column !== this._svc.currentEditCell.column)) {
9906
+ this.startEditRowOrCell(null);
9907
+ }
9908
+ }
9917
9909
  }
9918
- }
9919
- if (!this.eventIsOnRow(event) && !event.defaultPrevented) {
9920
- if (this.editType === EditType.row) {
9921
- this._svc.startEditRow(null);
9910
+ if (row) {
9911
+ if (event.ctrlKey) {
9912
+ this._svc.selectOrDeselectRow(row);
9913
+ }
9914
+ else if (event.shiftKey) {
9915
+ this._svc.selectRange(row);
9916
+ }
9917
+ else {
9918
+ this._svc.selectRows([row]);
9919
+ }
9922
9920
  }
9923
- else {
9924
- this._svc.startEditCell(null);
9921
+ if (!eventIsOnRow && !event.defaultPrevented) {
9922
+ if (this.editType === EditType.row) {
9923
+ this._svc.startEditRow(null);
9924
+ }
9925
+ else {
9926
+ this._svc.startEditCell(null);
9927
+ }
9925
9928
  }
9926
- }
9929
+ });
9927
9930
  }
9928
9931
  focusIn(event) {
9929
9932
  const coordinates = this.getCoordinates(event);
@@ -9940,13 +9943,15 @@ class TableComponent {
9940
9943
  dblclick(event) {
9941
9944
  const coordinates = this.getCoordinates(event);
9942
9945
  if (coordinates) {
9943
- this.cellDoubleClick.emit({
9944
- ...this._svc.getCellInstance(coordinates),
9945
- event
9946
+ setTimeout(() => {
9947
+ this.cellDoubleClick.emit({
9948
+ ...this._svc.getCellInstance(coordinates),
9949
+ event
9950
+ });
9951
+ if (this.editEvent === EditEvent.doubleClick) {
9952
+ this.startEditRowOrCell(coordinates);
9953
+ }
9946
9954
  });
9947
- if (this.editEvent === EditEvent.doubleClick) {
9948
- this.startEditRowOrCell(coordinates);
9949
- }
9950
9955
  }
9951
9956
  }
9952
9957
  keydown(event) {