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:
@@ -29,6 +29,7 @@ export abstract class CardViewBaseItemModel {
|
||||
validators?: CardViewItemValidator[];
|
||||
data?: any;
|
||||
type?: string;
|
||||
multivalued?: boolean;
|
||||
|
||||
constructor(cardViewItemProperties: CardViewItemProperties) {
|
||||
this.label = cardViewItemProperties.label || '';
|
||||
@@ -40,6 +41,7 @@ export abstract class CardViewBaseItemModel {
|
||||
this.icon = cardViewItemProperties.icon || '';
|
||||
this.validators = cardViewItemProperties.validators || [];
|
||||
this.data = cardViewItemProperties.data || null;
|
||||
this.multivalued = !!cardViewItemProperties.multivalued;
|
||||
|
||||
if (cardViewItemProperties?.constraints?.length ?? 0) {
|
||||
for (const constraint of cardViewItemProperties.constraints) {
|
||||
@@ -51,7 +53,7 @@ export abstract class CardViewBaseItemModel {
|
||||
}
|
||||
|
||||
isEmpty(): boolean {
|
||||
return this.value === undefined || this.value === null || this.value === '';
|
||||
return this.value === undefined || this.value === null || this.value.length === 0;
|
||||
}
|
||||
|
||||
isValid(newValue: any): boolean {
|
||||
|
Reference in New Issue
Block a user