Skip to content

Commit 920085e

Browse files
committed
chore(*): allow to cnacel rowSelection Event
1 parent f534dda commit 920085e

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

projects/igniteui-angular/src/lib/core/grid-selection.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ export class IgxGridSelectionService {
566566

567567
/** Select the specified row and emit event. */
568568
selectRowById(rowID, clearPrevSelection?, event?): void {
569-
if (this.grid.isRowSelectable || this.isRowDeleted(rowID)) { return; }
569+
if (!this.grid.isRowSelectable || this.isRowDeleted(rowID)) { return; }
570570
clearPrevSelection = !this.grid.isMultiRowSelectionEnabled || clearPrevSelection;
571571

572572
const newSelection = clearPrevSelection ? [rowID] : this.getSelectedRows().indexOf(rowID) !== -1 ?
@@ -644,10 +644,7 @@ export class IgxGridSelectionService {
644644
added: added, removed: removed, event: event, cancel: false
645645
};
646646
this.grid.onRowSelectionChange.emit(args);
647-
if (args.cancel) {
648-
if (args.event && args.event.checkbox) { event.checkbox.checked = !event.checkbox.checked; }
649-
return;
650-
}
647+
if (args.cancel) { return; }
651648
this.selectRowsWithNoEvent(args.newSelection, true);
652649
}
653650

0 commit comments

Comments
 (0)