* Returns a paged slice of the provided data array according to the provided paginator's page * index and length. If there is no paginator provided, returns the data array as provided.
(data: T[])
| 337 | * index and length. If there is no paginator provided, returns the data array as provided. |
| 338 | */ |
| 339 | _pageData(data: T[]): T[] { |
| 340 | if (!this.paginator) { |
| 341 | return data; |
| 342 | } |
| 343 | |
| 344 | const startIndex = this.paginator.pageIndex * this.paginator.pageSize; |
| 345 | return data.slice(startIndex, startIndex + this.paginator.pageSize); |
| 346 | } |
| 347 | |
| 348 | /** |
| 349 | * Updates the paginator to reflect the length of the filtered data, and makes sure that the page |
no outgoing calls
no test coverage detected