@trudb/tru-common-lib 0.2.256 → 0.2.257
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.
|
@@ -7909,12 +7909,15 @@ class TruDataGrid {
|
|
|
7909
7909
|
let isArrowLeft = params.event.code === 'ArrowLeft';
|
|
7910
7910
|
let isArrowRight = params.event.code === 'ArrowRight';
|
|
7911
7911
|
let isSpace = params.event.code === 'Space';
|
|
7912
|
+
let isDelete = params.event.code === 'Delete';
|
|
7912
7913
|
let isShiftKey = params.event.shiftKey;
|
|
7913
7914
|
let isAltKey = params.event.altKey;
|
|
7914
7915
|
let focusedCell = params.api.getFocusedCell();
|
|
7915
7916
|
let hasChoices = params.data[params.column.getColId()] && params.data[params.column.getColId()].choices ? true : false;
|
|
7916
7917
|
if (isSpace)
|
|
7917
7918
|
return true;
|
|
7919
|
+
if (isDelete)
|
|
7920
|
+
return true;
|
|
7918
7921
|
if (params.column.isPinned()) {
|
|
7919
7922
|
if (isTabKey && !isShiftKey)
|
|
7920
7923
|
params.api.tabToNextCell();
|
|
@@ -8111,6 +8114,15 @@ class TruDataGrid {
|
|
|
8111
8114
|
key: event.code
|
|
8112
8115
|
});
|
|
8113
8116
|
}
|
|
8117
|
+
else if (event.code === 'Delete' && !editingCells.length) {
|
|
8118
|
+
event.preventDefault();
|
|
8119
|
+
event.stopPropagation();
|
|
8120
|
+
this.api?.startEditingCell({
|
|
8121
|
+
rowIndex: params.rowIndex,
|
|
8122
|
+
colKey: params.column.getColId(),
|
|
8123
|
+
key: event.code
|
|
8124
|
+
});
|
|
8125
|
+
}
|
|
8114
8126
|
else if (params.column.isPinned() && event.ctrlKey && event.code === 'KeyC') {
|
|
8115
8127
|
let selectedRows = this.api.getSelectedRows();
|
|
8116
8128
|
let columnDefs = this.api.getColumnDefs();
|