mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5390] [ADF-5391] Add multivalue cardview for Date, Datetime, Integers and Decimal properties. (#6980)
* [ADF-5390] Addd multivalue cardview for Date, Datetime, Integers and Decimal properties * Fix unit test * Fix linting * Fix e2e tests * fix e2e Co-authored-by: Eugenio Romano <eugenio.romano@alfresco.com>
This commit is contained in:
@@ -24,14 +24,12 @@ export class CardViewTextItemModel extends CardViewBaseItemModel implements Card
|
||||
type: string = 'text';
|
||||
inputType: string = 'text';
|
||||
multiline?: boolean;
|
||||
multivalued?: boolean;
|
||||
pipes?: CardViewTextItemPipeProperty[];
|
||||
clickCallBack?: any;
|
||||
|
||||
constructor(cardViewTextItemProperties: CardViewTextItemProperties) {
|
||||
super(cardViewTextItemProperties);
|
||||
this.multiline = !!cardViewTextItemProperties.multiline;
|
||||
this.multivalued = !!cardViewTextItemProperties.multivalued;
|
||||
this.pipes = cardViewTextItemProperties.pipes || [];
|
||||
this.clickCallBack = cardViewTextItemProperties.clickCallBack ? cardViewTextItemProperties.clickCallBack : null;
|
||||
|
||||
@@ -44,7 +42,7 @@ export class CardViewTextItemModel extends CardViewBaseItemModel implements Card
|
||||
return this.applyPipes(this.value);
|
||||
}
|
||||
|
||||
private applyPipes(displayValue) {
|
||||
applyPipes(displayValue) {
|
||||
if (this.pipes.length) {
|
||||
displayValue = this.pipes.reduce((accumulator, { pipe, params = [] }) => {
|
||||
return pipe.transform(accumulator, ...params);
|
||||
|
Reference in New Issue
Block a user