1.2.3 • Published 4 months ago

@forter/card-list v1.2.3

Weekly downloads
-
License
Apache-2.0
Repository
github
Last release
4 months ago

fc-card-list

An element by Forter

Usage

<script>
   import '@forter/card-list';
</script>

<fc-card-list>
</fc-card-list>

Properties

PropertyAttributeTypeDescription
ROW_INTENTS{}
columnscolumnsany[]Columns titles
getRowClass(rowClass: any, intent: any) => any
getSortedRows() => any
renderColumnsHeaders() => TemplateResult
renderData(intent: any, data: any) => TemplateResult
renderDataCell({ label, customRenderer }: { label: any; customRenderer: any; }) => any
renderRows() => TemplateResult
rowsrowsanyExample: {intent: 'disabled',data: {label: '1'}, {label: '2'}}
sortBysortByany[]This is an option to sort rows by a specific key of the rows data.After providing this object the card-list will sort rows depending on it.columnIndex is the index of column you wish to compare. I.e. if we have following columns list ('order', 'name', 'level')and we want to order by 'order' columns, columnIndex should be 0 (as its the first column on the list).sortKey should be the key in the row's data we want to sort by. I.e. if a row's data is:data: {label: '1', value: 1}, {label: '2', value: 2}we can either sort by 'label' or by 'value'. The sortFunction should be accordingly to the key's type (number, string..) as in next example:{ columnIndex: 0, sortKey: 'value', sortFunction: (a,b) => {return a-b}}

CSS Custom Properties

PropertyDescription
--fc-card-list-disabled-colordisabled color. example: gray
1.2.3

4 months ago

1.2.2

4 months ago

1.2.0

12 months ago

1.2.1

12 months ago

1.1.0

1 year ago

1.0.1

2 years ago