fix keyboard shortcuts and added support for select all inside grid (#1369)
This commit is contained in:
Родитель
4cf8505261
Коммит
9a87b6ad40
|
@ -593,7 +593,7 @@
|
|||
"event.copyWithHeaders": "",
|
||||
"event.copyHeaders": "",
|
||||
"event.maximizeGrid": "",
|
||||
"event.selectAll": "",
|
||||
"event.selectAll": "ctrl+A",
|
||||
"event.saveAsJSON": "",
|
||||
"event.saveAsCSV": "",
|
||||
"event.saveAsExcel": ""
|
||||
|
|
|
@ -768,15 +768,8 @@ export class AppComponent implements OnInit, AfterViewChecked {
|
|||
/**
|
||||
*
|
||||
*/
|
||||
keyEvent(e): void {
|
||||
keyEvent(e: KeyboardEvent): void {
|
||||
const self = this;
|
||||
if (e.detail) {
|
||||
e.which = e.detail.which;
|
||||
e.ctrlKey = e.detail.ctrlKey;
|
||||
e.metaKey = e.detail.metaKey;
|
||||
e.altKey = e.detail.altKey;
|
||||
e.shiftKey = e.detail.shiftKey;
|
||||
}
|
||||
let eString = this.shortcuts.buildEventString(e);
|
||||
this.shortcuts.getEvent(eString).then((result) => {
|
||||
if (result) {
|
||||
|
|
|
@ -126,7 +126,7 @@ export class ShortcutService {
|
|||
resString += (e.ctrlKey || e.metaKey) ? 'ctrl+' : '';
|
||||
resString += e.altKey ? 'alt+' : '';
|
||||
resString += e.shiftKey ? 'shift+' : '';
|
||||
resString += e.which >= 65 && e.which <= 90 ? String.fromCharCode(e.which).toLowerCase() : keycodes[e.which];
|
||||
resString += e.which >= 65 && e.which <= 90 ? String.fromCharCode(e.which) : keycodes[e.which];
|
||||
return resString;
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче