click on elements that is inside of cell
vaydich opened this issue · comments
vaydich commented
Hello
I have 5 images that render in loop inside each cell.
How can i listen click of each image but not hole cell?
Robert Hjalmers commented
Take a look at the custom-column example and handle the click event inside your component instead.
The field settings for the column should look something like this:
{
objectKey: 'images',
name: 'Images',
columnComponent: {
type: ImagesComponent
}
}
The images component should in turn look something like this:
export class ImagesComponent extends GtCustomComponent<Row> implements OnInit {
constructor() {
super();
}
ngOnInit() {
console.log(this.row); // log the row
console.log(this.column); // log the column
}
}
vaydich commented
I got it. Thx!