l-lin / angular-datatables

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

Angular 17 with Angular-Datatables: Unable to Re-render DataTable #1801

Closed mehulk05 closed 1 month ago

mehulk05 commented 1 month ago

Issue 'm working on an Angular 17 application using Angular-Datatables, and using custom search on which I make an API call to get the updated search results from api and I'm having trouble re-rendering the DataTable when after a search.

Problem: I am unable to re-render the DataTable with updated data when performing a search. I have checked the documentation and tried various approaches, including triggering the dtTrigger in ngAfterViewInit, but it didn’t work.

Stackover flow: https://stackoverflow.com/questions/78752773/angular-17-with-angular-datatables-unable-to-re-render-datatable

:microscope: Minimal Reproduction

Source code where issue is available https://github.com/mehulk05/angular-datatable https://stackoverflow.com/questions/78752773/angular-17-with-angular-datatables-unable-to-re-render-datatable

StackBlitz/GitHub Link: Sandbox link: https://codesandbox.io/p/sandbox/naughty-noyce-sv6326?file=%2Fsrc%2Fapp%2Fapp.component.ts%3A28%2C17

Step-by-step Instructions:

:8ball: Expected behavior

A clear and concise description of what you expected to happen.

:camera: Screenshots

image

As you can see in above screenshot, the data coming from API have seven records but the datatable is always showing 0 records

shanmukhateja commented 1 month ago

This approach has been deprecated in favor of built-in support for TemplateRef and Pipe .

Please refer https://l-lin.github.io/angular-datatables/#/faq for more info.

Closing this issue.