Skip to content

Commit

Permalink
Merge pull request #3380 from IgniteUI/bpachilova/fix-3379
Browse files Browse the repository at this point in the history
fix(grids): Alter conditional row selection samples according to changed API
  • Loading branch information
teodosiah authored Aug 31, 2023
2 parents 8f016cc + 81b13d4 commit 8ff94cf
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<ng-template igxRowSelector let-rowContext>
<div class="row-selector">
<igx-checkbox [readonly]="true" [checked]="rowContext.selected"
[disabled]="!isSelectionAllowed(rowContext.rowID)"
[disabled]="!isSelectionAllowed(rowContext.key)"
[aria-label]="rowContext.selected ? 'Deselect row' : 'Select row'">
</igx-checkbox>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export class GridConditionalRowSelectorsComponent {
const originalAddedLength = event.added.length;

// update selection to contain only allowed rows
event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x));
event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x.ID));

// cleanup selection if all conditionally selectable rows are already selected
if (event.newSelection.length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<ng-template igxRowSelector let-rowContext>
<div class="row-selector">
<igx-checkbox [readonly]="true" [checked]="rowContext.selected"
[disabled]="!isSelectionAllowed(rowContext.rowID)"
[disabled]="!isSelectionAllowed(rowContext.key)"
[aria-label]="rowContext.selected ? 'Deselect row' : 'Select row'">
</igx-checkbox>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export class HGridConditionalRowSelectorsComponent implements OnInit {
const originalAddedLength = event.added.length;

// update selection to contain only allowed rows
event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x));
event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x.Artist));

// cleanup selection if all conditionally selectable rows are already selected
if (event.newSelection.length
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<ng-template igxRowSelector let-rowContext>
<div class="row-selector">
<igx-checkbox [readonly]="true" [checked]="rowContext.selected"
[disabled]="!isSelectionAllowed(rowContext.rowID)"
[disabled]="!isSelectionAllowed(rowContext.key)"
[aria-label]="rowContext.selected ? 'Deselect row' : 'Select row'">
</igx-checkbox>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export class TreeGridConditionalRowSelectorsSampleComponent implements OnInit {
const originalAddedLength = event.added.length;

// update selection to contain only allowed rows
event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x));
event.newSelection = event.newSelection.filter(x => this.isSelectionAllowed(x.ID));

// cleanup selection if all conditionally selectable rows are already selected
if (event.newSelection.length
Expand Down

0 comments on commit 8ff94cf

Please sign in to comment.