mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-3275] Select CardView item (#3530)
* Select card view item * package json fix * package json fix * console.log removed * Usage of generic
This commit is contained in:
committed by
Eugenio Romano
parent
da8ffdfe5e
commit
7563f91665
@@ -79,6 +79,12 @@ Defining properties from Typescript:
|
||||
value: [],
|
||||
key: 'key-value-pairs'
|
||||
}),
|
||||
new CardViewSelectItemModel({
|
||||
label: 'Select box',
|
||||
value: 'one',
|
||||
options$: of([{ key: 'one', label: 'One' }, { key: 'two', label: 'Two' }]),
|
||||
key: 'select'
|
||||
}),
|
||||
...
|
||||
]
|
||||
```
|
||||
@@ -105,6 +111,7 @@ You define the property list, the [`CardViewComponent`](../core/card-view.compon
|
||||
- [**CardViewIntItemModel**](#card-int-item) - _for integer items_
|
||||
- [**CardViewFloatItemModel**](#card-float-item) - _for float items_
|
||||
- [**CardViewKeyValuePairsItemModel**](#card-key-values-pairs-item) - _for key-value-pairs items_
|
||||
- [**CardViewSelectItemModel**](#card-select-item) - _for select items_
|
||||
|
||||
Each of these types implements the [Card View Item interface](card-view-item.interface.md):
|
||||
|
||||
@@ -309,6 +316,23 @@ const keyValuePairsItemProperty = new CardViewKeyValuePairsItemModel(options);
|
||||
| value\* | `[{ name: '', value: '' }, ...]` | | The original data value for the item |
|
||||
|
||||
|
||||
#### Card Select Item
|
||||
|
||||
[`CardViewSelectItemModel`](../../lib/core/card-view/models/card-view-selectitem.model.ts) is a property type for select properties.
|
||||
|
||||
```ts
|
||||
const selectItemProperty = new CardViewSelectItemModel(options);
|
||||
```
|
||||
|
||||
| Name | Type | Default | Description |
|
||||
| ---- | ---- | ------- | ----------- |
|
||||
| label\* | string | | Item label |
|
||||
| key\* | string | | Identifying key (important when editing the item) |
|
||||
| editable | boolean | false | Toggles whether the item is editable |
|
||||
| value | string | | The original data value for the item |
|
||||
| options$\* | Observable<CardViewSelectItemOption[]> | | The original data value for the item |
|
||||
|
||||
|
||||
|
||||
## See also
|
||||
|
||||
|
Reference in New Issue
Block a user