How to add a custom button with event emmeter ?
- Linguagem predominante
- TypeScript
- Estrelas
- 1.6k
- Forks
- 867
- Métricas de merge de PRs
- Nenhum PR com merge em 30d
Descrição
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
Guia de contribuição
Nenhum guia de contribuição indexado para este repositório
Avaliação
Esta issue ainda não foi avaliada.