Open
Description
When running ng serve
everything works
Just upgraded to angular 10 and got everything working, finally got to running a prod build and not of my DataTables are loading. Using ng build --prod && npx angular-http-server --path ./dist -p 3001
. It seems like the CdkTable is not instantiated because the DataSource.connect function is never called.
I have a component library that has also been upgraded to angular 10 and works, the component library has a DataTable component that use <cdk-table>
like so: (this has been working with prior versions)
<cdk-table
[dataSource]="dataSource"
[trackBy]="trackByFn"
[class.expandable]="expandable"
[class.empty]="dataSource?.currentlyEmpty && state.userFiltered"
[hidden]="dataSource?.totallyEmpty && !state.userFiltered"
#table
>
I added @ViewChild('table') tableRef: CdkTable<T>;
when I console.log this i get:
Environment
- Angular: 10+
- CDK/Material: 10.1.3
- Browser(s): Chrome
- Operating System (e.g. Windows, macOS, Ubuntu): MacOS