mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
add click callback and remove icon if is not editable (#4516)
This commit is contained in:
@@ -48,6 +48,10 @@ export class CardViewComponent implements OnInit {
|
||||
this.createCard();
|
||||
}
|
||||
|
||||
respondToCardClick() {
|
||||
this.logs.push(`clickable field`);
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.cardViewUpdateService.itemUpdated$.subscribe(this.onItemChange.bind(this));
|
||||
}
|
||||
@@ -118,6 +122,16 @@ export class CardViewComponent implements OnInit {
|
||||
value: new Map([['999', 'My Value']]),
|
||||
key: 'map',
|
||||
default: 'default map value'
|
||||
}),
|
||||
new CardViewTextItemModel({
|
||||
label: 'This is clickable ',
|
||||
value: 'click here',
|
||||
key: 'click',
|
||||
default: 'click here',
|
||||
clickable: true,
|
||||
clickCallBack: () => {
|
||||
this.respondToCardClick();
|
||||
}
|
||||
})
|
||||
];
|
||||
}
|
||||
|
Reference in New Issue
Block a user