How to add a custom button with event emmeter ?
- Lenguaje dominante
- TypeScript
- Estrellas
- 1.6k
- Forks
- 867
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hey,
I'd like to add a custom button on each row. I achieved it dealing with the 'html' property and the sanitizer, but I couldn't find a way to handle the event ? Is it possible to add an event emitter which is correctly interpreted by ng2? Bypassing HTML & JS Security ?
I can't listen directly to the button events.
What I'm currently doing:
```
{
columns: {
test: {
title: 'fire',
type: 'html',
valuePrepareFunction: (value) => {
return this._sanitizer.bypassSecurityTrustHtml('TEST'); //Click listener not interpreted...
}
}
}
};
```
Then add an event on the table
``
Set the selected item
```
onSelect(event){
this.selectedItem=event.data._id;
}
```
Then add an outside button to the table that handle the wanted event.
Thanks
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.