Skip to content

Commit

Permalink
Merge pull request #2921 from Akshat55/issue.2915
Browse files Browse the repository at this point in the history
fix: trigger check to see if all checkboxes are selected after data is set
  • Loading branch information
zvonimirfras committed Jun 25, 2024
2 parents 3e36538 + dfce8fa commit 17da1f5
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/table/table.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import {
Component,
ApplicationRef,
Input,
OnInit,
Output,
EventEmitter,
ElementRef,
Expand Down Expand Up @@ -247,7 +248,7 @@ import { TableRowSize } from "./table.types";
}
`]
})
export class Table implements AfterViewInit, OnDestroy {
export class Table implements OnInit, AfterViewInit, OnDestroy {
/**
* Creates a skeleton model with a row and column count specified by the user
*
Expand Down Expand Up @@ -648,6 +649,12 @@ export class Table implements AfterViewInit, OnDestroy {
protected i18n: I18n
) { }

ngOnInit() {
// Manually trigger check to see if all checkboxes are selected
// This is since subscription is made AFTER checkboxes are selected
this.updateSelectAllCheckbox();
}

ngAfterViewInit() {
this.isViewReady = true;
if (this.isDataGrid) {
Expand Down

0 comments on commit 17da1f5

Please sign in to comment.