Lists display data in a consistent, flexible way.
SkyListModule
@skyux/list-builder
npm install --save-exact @skyux/list-builder
sky-list
Input | Description | ||||
---|---|---|---|---|---|
appliedFilters?: ListFilterModel[] | The set of filters to apply to list data.
These filters create a filter summary when the list includes the
Optional. Default is [] | ||||
data?: any[] | Observable<any[]> | The data to display. The list component requires this property or the
Optional. Default is [] | ||||
dataProvider?: ListDataProvider | The data provider that obtains the data to display. The list component requires
this property or the Optional. Default is SkyListInMemoryDataProvider | ||||
initialTotal?: number | The total number of items for the initial data set when initialized. When
used in conjunction with Optional. | ||||
search?: (data: any, searchText: string) => boolean | The function to apply as a global sort on the list. Optional. Parameters
Returnsboolean | ||||
selectedIds?: string[] | Observable<string[]> | The set of IDs for the items to select in a checklist or multiselect grid.
The IDs match the Optional. | ||||
sortFields?: ListSortFieldSelectorModel | ListSortFieldSelectorModel[] | Observable<ListSortFieldSelectorModel[]> | Observable<ListSortFieldSelectorModel> | The set of fields to sort by. If array of fields then sorted by order of array.
For information about Optional. |
Event | Description |
---|---|
appliedFiltersChange: EventEmitter<ListFilterModel[]> | Emits the filters applied to the list. |
selectedIdsChange: EventEmitter<Map> | For list views that support item selection, emits the selected entries. |
Property | Description |
---|---|
filters?: ListFilterModel[] | The function that determines whether items are filtered. This property is required when using an in-memory data provider. Optional. |
isToolbarDisabled?: boolean | Whether to disable the search bar and filter button. Optional. Default is false |
pageNumber?: number | The current page number. Optional. |
pageSize?: number | The number of items to display per page. Optional. |
search?: ListSearchModel | The function to dynamically manage the data source when users
change the text in the list field. The search function must return an
array or a promise of an array. The Optional. |
sort?: ListSortModel | The set of fields to sort by. Optional. |
Property | Description |
---|---|
count?: number | The total number of records in the list. Optional. |
items?: ListItemModel[] | An array of the items returned. For information about Optional. |
Specifies a function to dynamically manage the data source when users change the text
in the list field. The search function must return an array or a promise of an array.
The search
property is particularly useful when the data source does not live
in the source code.
Property | Description | ||||
---|---|---|---|---|---|
fieldSelectors?: string[] | The columns to search. The columns correspond to Optional. Default is [] | ||||
functions?: ((data: any, searchText: string) => boolean)[] | The array of functions that returns a Optional. Default is [] Parameters
Returnsboolean | ||||
searchText?: string | The text to search. Optional. Default is "" |
These properties are a work in progress, and we do not recommend using them.
Property | Description |
---|---|
descending?: boolean | Whether to sort in descending order. Optional. Default is false |
fieldSelector?: string | The fields to sort. Optional. |
fieldType?: string | The label type. Optional. |
global?: boolean | Whether to sort all fields. Optional. Default is false |
text?: string | The text for the label. Optional. |
Specifies a set of fields to sort by.
Property | Description |
---|---|
available?: ListSortLabelModel[] | The list of available views to sort. Optional. Default is [] |
fieldSelectors?: ListSortFieldSelectorModel[] | The fields to sort.
For information about Optional. Default is [] |
global?: ListSortLabelModel[] | The list views that the sort applies to. Optional. Default is [] |