You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ombi/src/Ombi/ClientApp/src/app/pipes/OrderPipe.ts

12 lines
313 B

import { Pipe, PipeTransform } from '@angular/core';
import { orderBy as _orderBy } from 'lodash';
@Pipe({
name: 'orderBy',
})
export class OrderPipe<T> implements PipeTransform {
transform(data: T[], orderBy: string, direction: 'asc' | 'desc' = 'asc'): T[] {
return _orderBy(data, orderBy, direction);
}
}