mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
selection management enhancements for DT/DL (#2209)
This commit is contained in:
committed by
Eugenio Romano
parent
a536bcbbd2
commit
98b4f4cef4
@@ -237,17 +237,17 @@ export class DataTableComponent implements AfterContentInit, OnChanges, DoCheck
|
||||
|
||||
if (row) {
|
||||
if (this.data) {
|
||||
const newValue = !row.isSelected;
|
||||
const domEventName = newValue ? 'row-select' : 'row-unselect';
|
||||
|
||||
if (this.isSingleSelectionMode()) {
|
||||
this.resetSelection();
|
||||
this.selectRow(row, newValue);
|
||||
this.emitRowSelectionEvent(domEventName, row);
|
||||
this.selectRow(row, true);
|
||||
this.emitRowSelectionEvent('row-select', row);
|
||||
}
|
||||
|
||||
if (this.isMultiSelectionMode()) {
|
||||
const modifier = e.metaKey || e.ctrlKey;
|
||||
const modifier = e && (e.metaKey || e.ctrlKey);
|
||||
const newValue = modifier ? !row.isSelected : true;
|
||||
const domEventName = newValue ? 'row-select' : 'row-unselect';
|
||||
|
||||
if (!modifier) {
|
||||
this.resetSelection();
|
||||
}
|
||||
|
Reference in New Issue
Block a user