Skip to content

Commit

Permalink
fix(grids): alter according to changed API
Browse files Browse the repository at this point in the history
  • Loading branch information
ddaribo committed Aug 30, 2023
1 parent 8f016cc commit 81b13d4
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 81b13d4

Please sign in to comment.