l-lin / angular-datatables

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

[NgTemplateRef] Show adtData only after click on cell #1610

Closed giolongo closed 2 years ago

giolongo commented 2 years ago

In dtOptions.columns i defined a ngTemplateRef like as this { title: 'Column With Link', data: null, ngTemplateRef: { ref: this.demoNg } }

demoNg is that defined: @ViewChild('demoNg') demoNg: TemplateRef<{ data: any}>;

the table is: <table datatable class="table table-striped table-bordered table-sm row-border hover" [dtTrigger]="dtTrigger" [dtOptions]="dtOptions">

and, finally, the ng-template: <ng-template #demoNg let-data='adtData'> <small class="text-primary" *ngIf="data.id"> {{data}} </small> </ng-template>

I can see this cell only after click in itself, but i would like to see this immediatly (when the table is loaded).

shanmukhateja commented 2 years ago

Hi

Please provide a reproducible repo in StackBlitz/GitHub to investigate this.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 2 years ago

This issue has been closed due to inactivity. Please feel free to re-open the issue to add new inputs.