diff --git a/apps/doc/src/app/components/table/examples/table-data-source-example/table-data-source-example.component.ts b/apps/doc/src/app/components/table/examples/table-data-source-example/table-data-source-example.component.ts index 9a914c48f6..e534f1421a 100644 --- a/apps/doc/src/app/components/table/examples/table-data-source-example/table-data-source-example.component.ts +++ b/apps/doc/src/app/components/table/examples/table-data-source-example/table-data-source-example.component.ts @@ -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; } diff --git a/libs/components/src/lib/components/table/data-source.ts b/libs/components/src/lib/components/table/data-source.ts index 490bc11c27..b95b52642a 100644 --- a/libs/components/src/lib/components/table/data-source.ts +++ b/libs/components/src/lib/components/table/data-source.ts @@ -16,8 +16,8 @@ interface PrizmSorter { * Decoupled so that users can depend on their own implementation. */ export interface PrizmTableDataSourcePageEvent { - page: number; - rows: number; + readonly page: number; + readonly rows: number; } /** @@ -26,14 +26,14 @@ export interface PrizmTableDataSourcePageEvent { * Decoupled so that users can depend on their own implementation. */ export interface PrizmTableDataSourcePaginator { - paginatorChange: Observable; + readonly paginatorChange: Observable; /** * 1-based index of the currently viewed page. */ currentPage: number; - rows: number; - totalRecords: number; - initialized?: Observable; + readonly rows: number; + totalRecords: number | null; + readonly initialized?: Observable; } type FilterPredicate = (o: T, index: number) => boolean;