RED-6343: Shift+click selection in table (anywhere on list item)

This commit is contained in:
Adina Țeudan 2023-06-01 23:57:32 +03:00
parent 406f7b1fdd
commit 2a9c43fc6b

View File

@ -47,7 +47,7 @@ export class TableContentComponent<Class extends IListable<PrimaryKey>, PrimaryK
multiSelect(entity: Class, $event: MouseEvent): void {
if (this.selectionEnabled && this._multiSelectActive$.value) {
$event.stopPropagation();
this.listingService.select(entity);
this.listingService.select(entity, $event.shiftKey);
}
}
@ -80,6 +80,7 @@ export class TableContentComponent<Class extends IListable<PrimaryKey>, PrimaryK
@HostListener('window:keydown.control')
@HostListener('window:keydown.meta')
@HostListener('window:keydown.shift')
private _enableMultiSelect() {
this._multiSelectActive$.next(true);
}
@ -88,6 +89,7 @@ export class TableContentComponent<Class extends IListable<PrimaryKey>, PrimaryK
@HostListener('window:blur')
@HostListener('window:keyup.control')
@HostListener('window:keyup.meta')
@HostListener('window:keyup.shift')
private _disableMultiSelect() {
this._multiSelectActive$.next(false);
}