Options
All
  • Public
  • Public/Protected
  • All
Menu

Class SortArrayPipe

Sort array pipe

This is currently used with the pin feature of the list component

Example:

Usage:

// Individual module import
import { SortArrayPipeModule } from 'patternfly-ng/pipe';
// Or
import { SortArrayPipeModule } from 'patternfly-ng';

@NgModule({ imports: [SortArrayPipeModule,...] }) export class AppModule(){}

Hierarchy

  • SortArrayPipe

Implements

  • PipeTransform

Index

Methods

Methods

transform

  • transform(arr: Array<any>, prop: any, descending?: boolean): any
  • Sort array by property

    Parameters

    • arr: Array<any>

      Array to sort

    • prop: any

      Property name to sort by

    • Default value descending: boolean = false

      True to sort descending

    Returns any

    Returns sorted array

Generated using TypeDoc