Skip to content

Commit

Permalink
Merge pull request #1752 from zyfra/fix/datasource-incompatible-with-…
Browse files Browse the repository at this point in the history
…paginator_v3

Fix/datasource incompatible with paginator v3
  • Loading branch information
ickisIckis authored May 31, 2024
2 parents c547360 + c70fe62 commit 99e6808
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ export class TableDataSourceExampleComponent implements OnInit {
}

ngOnInit(): void {
this.dataSource.paginator = this.paginator as any;
this.dataSource.paginator = this.paginator;
this.dataSource.sorter = this.table.sorterService;
}

Expand Down
12 changes: 6 additions & 6 deletions libs/components/src/lib/components/table/data-source.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ interface PrizmSorter<T = unknown> {
* Decoupled so that users can depend on their own implementation.
*/
export interface PrizmTableDataSourcePageEvent {
page: number;
rows: number;
readonly page: number;
readonly rows: number;
}

/**
Expand All @@ -26,14 +26,14 @@ export interface PrizmTableDataSourcePageEvent {
* Decoupled so that users can depend on their own implementation.
*/
export interface PrizmTableDataSourcePaginator {
paginatorChange: Observable<PrizmTableDataSourcePageEvent>;
readonly paginatorChange: Observable<PrizmTableDataSourcePageEvent>;
/**
* 1-based index of the currently viewed page.
*/
currentPage: number;
rows: number;
totalRecords: number;
initialized?: Observable<void>;
readonly rows: number;
totalRecords: number | null;
readonly initialized?: Observable<void>;
}

type FilterPredicate<T> = (o: T, index: number) => boolean;
Expand Down

0 comments on commit 99e6808

Please sign in to comment.