RED-6343: Shift+click selection in table (anywhere on list item)
This commit is contained in:
parent
406f7b1fdd
commit
2a9c43fc6b
@ -47,7 +47,7 @@ export class TableContentComponent<Class extends IListable<PrimaryKey>, PrimaryK
|
|||||||
multiSelect(entity: Class, $event: MouseEvent): void {
|
multiSelect(entity: Class, $event: MouseEvent): void {
|
||||||
if (this.selectionEnabled && this._multiSelectActive$.value) {
|
if (this.selectionEnabled && this._multiSelectActive$.value) {
|
||||||
$event.stopPropagation();
|
$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.control')
|
||||||
@HostListener('window:keydown.meta')
|
@HostListener('window:keydown.meta')
|
||||||
|
@HostListener('window:keydown.shift')
|
||||||
private _enableMultiSelect() {
|
private _enableMultiSelect() {
|
||||||
this._multiSelectActive$.next(true);
|
this._multiSelectActive$.next(true);
|
||||||
}
|
}
|
||||||
@ -88,6 +89,7 @@ export class TableContentComponent<Class extends IListable<PrimaryKey>, PrimaryK
|
|||||||
@HostListener('window:blur')
|
@HostListener('window:blur')
|
||||||
@HostListener('window:keyup.control')
|
@HostListener('window:keyup.control')
|
||||||
@HostListener('window:keyup.meta')
|
@HostListener('window:keyup.meta')
|
||||||
|
@HostListener('window:keyup.shift')
|
||||||
private _disableMultiSelect() {
|
private _disableMultiSelect() {
|
||||||
this._multiSelectActive$.next(false);
|
this._multiSelectActive$.next(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user