alfresco-ng2-components/docs/core/sorting-picker.component.md
Denys Vuika 07440731fa [ADF-2131] Search sorting (#3334)
* sorting configuration

* detect primary sorting and use with document list

* search results sorting

* docs update

* unit tests and code updates

* update code

* update code

* generic sorting picker, test updates

* ability to switch off client side sorting

* update docs for document list
2018-05-18 14:33:28 +01:00

995 B

Added, Status
Added Status
v2.4.0 Active

Sorting Picker Component

Provides an ability to pick one of the predefined sorting definitions and define sorting direction:

<adf-sorting-picker
    [options]="options"
    [selected]="value"
    [ascending]="ascending"
    (change)="onChanged($event)">
</adf-sorting-picker>

Sorting Picker

Options format

You can bind a collection of any objects that expose the following properties:

{
    key: string;
    label: string;
}

Properties

| Name | Type | Default Value | Description | | options | Array<{key: string, label: string}> | [] | Available sorting options. | | selected | string | | Currently selected option key. | | ascending | boolean | true | Current sorting direction. |

Events

Name Type Description
change EventEmitter<{ key: string, ascending: boolean }> Raised each time sorting key or direction gets changed.