Error: supportsScrollBehavior is not declared configurable

It is not possible anymore to spy on individually exported functions. https://github.com/jasmine/jasmine/issues/1414 There are some workarounds that might work, but there isn’t a “works for all” solution. Quoting from above link: Actually setting “module”: “commonjs” in tsconfig.json for tests fixes this issue and you can use spyOn again. For me, this didn’t work. Jasmine needs … Read more

custom filter in mat-table

I found the solution here. It’s necessary to rewrite filterPredicate, and just use it as usual, filterPredicate needs to return true when filter passes and false when it doesn’t export interface Element { name: string; position: number; weight: number; symbol: string; } dataSource = new MatTableDataSource(ELEMENT_DATA); /* configure filter */ this.dataSource.filterPredicate = (data: Element, filter: … Read more

Angular 6 MatTable Performance in 1000 rows

Not sure if this will help your situation as there’s no code but we’ve found that the MatTable loads very slowly if a large data set is set before you set the datasource paginator. For example – this takes several seconds to render… dataSource: MatTableDataSource<LocationItem> = new MatTableDataSource(); @ViewChild(MatSort) sort: MatSort; @ViewChild(MatPaginator) paginator: MatPaginator; ngOnInit() … Read more