l-lin / angular-datatables

DataTables with Angular
https://l-lin.github.io/angular-datatables/
MIT License
1.57k stars 486 forks source link

Adding Angular component as table column puts [object HTMLElement] in the column #1667

Closed advapiIT closed 2 years ago

advapiIT commented 2 years ago

:beetle: bug report

Adding a column render puts content below

:microscope: Minimal Reproduction

I've a component with some button and logic that can be applied to different tables of my real application. I try to add this via dtOptions instead of having as before using the angular datatables in the HTML. The problem I've is that I see [Object HTML] in the table and a lot of buttons below. For the array of Click button I think it's due to the fact they're added without pagination, but it's wrong

StackBlitz/GitHub Link:

https://stackblitz.com/edit/angular-datatables-gitter-e8pokn?file=app%2Fapp.module.ts,app%2Fapp.component.ts,app%2Fbutton-component%2Fbutton-component.component.ts

Step-by-step Instructions:

:8ball: Expected behavior

The rendered component just in the table

image

:globe_with_meridians: Your Environment

shanmukhateja commented 2 years ago

Hi,

Can you try https://l-lin.github.io/angular-datatables/#/advanced/using-template-ref and report back?