* Returns a sorted copy of the data if MatSort has a sort applied, otherwise just returns the * data array as provided. Uses the default data accessor for data lookup, unless a * sortDataAccessor function is defined.
(data: T[])
| 324 | * sortDataAccessor function is defined. |
| 325 | */ |
| 326 | _orderData(data: T[]): T[] { |
| 327 | // If there is no active sort or direction, return the data without trying to sort. |
| 328 | if (!this.sort) { |
| 329 | return data; |
| 330 | } |
| 331 | |
| 332 | return this.sortData(data.slice(), this.sort); |
| 333 | } |
| 334 | |
| 335 | /** |
| 336 | * Returns a paged slice of the provided data array according to the provided paginator's page |
no test coverage detected