Improve this doc View source

# `pfSort`
directive in module `patternfly.sort`

## Description

Directive for a sort component

## Usage

as attribute

    <ANY pf-sort
         config="{object}">
       ...
    </ANY>

#### Parameters

Param | Type | Details
--- | --- | ---

config

object

configuration settings for the sort:

- .fields - (Array) List of sortable fields containing:
  - .id - (String) Unique Id for the sort field
  - .title - (String) The title to display for the sort field
  - .sortType - (String) The sort type, 'alpha' or 'numeric'
- .currentField - (Object) Currently selected field
- .isAscending - (boolean) Current sort direction is ascending. True for ascending, False for descending
- .onSortChange - ( function(sortId, sortDirection ) Function to call when the current sort params change

## Example

#### Source

#### Demo