add click callback and remove icon if is not editable (#4516)

This commit is contained in:
Eugenio Romano
2019-03-28 18:52:43 +00:00
committed by GitHub
parent 71fc1fd039
commit 944ca8e5d8
11 changed files with 60 additions and 18 deletions

View File

@@ -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();
}
})
];
}