MCPcopy Create free account
hub / github.com/angular/components / _orderData

Method _orderData

src/material/table/table-data-source.ts:326–333  ·  view source on GitHub ↗

* 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[])

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 1

sortDataMethod · 0.45

Tested by

no test coverage detected