• 1000 есть ли ограничение MatTableDataSource?
import { Component, OnInit ,ViewChild} from '@angular/core';
import {ApiService} from '../api.service'
import {Country} from '../country';
import {MatSort,MatSortable} from '@angular/material/sort';
import {MatTableDataSource} from '@angular/material/table';
import {Sort} from '@angular/material/sort';
import{State} from '../state'
@Component({ selector: 'app-home', templateUrl: './home.component.html', styleUrls: ['./home.component.scss'] })
export class HomeComponent implements OnInit {
constructor(private apiService:ApiService) { }
dataSource;
@ViewChild(MatSort,{static: true}) sort: MatSort;
displayedColumns: string[] = ['Name', 'A', 'B','C'];
ngOnInit(): void {
this.getState();
}
`getState(){`
`this.apiService.getAllStateData().subscribe(`
`(data:State[])=>{`
` this.dataSource=new MatTableDataSource(data)`
`this.dataSource.sort=this.sort`
`})`
`}`
}