l-lin / angular-datatables

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

Datatables no (more) working with Angular 14 Nebular 10 #1720

Closed daniele-koerber closed 1 year ago

daniele-koerber commented 1 year ago

:beetle: bug report

Datatables is not working with new (10) version of ngx-admin (Nebular 10, Angular 14).

:microscope: Minimal Reproduction

Trying to use the datatables plugin, depending on what version of packages I use, I get errors or I get nothing.

Following this https://stackoverflow.com/questions/70014280/facing-error-while-using-angular-datatables I also tried to use the old packages versions I was using in Angular 12 but I can't make them work.

StackBlitz/GitHub Link: https://github.com/daniele-koerber/test-datatables-ng14

Step-by-step Instructions:

:8ball: Expected behavior

A working data tables plugin. Even zero configurations example is not working

:camera: Screenshots

image image

:globe_with_meridians: Your Environment

shanmukhateja commented 1 year ago

Call loadDataTableOptions in ngAfterViewInit instead of ngOnInit. It uses this.datatableElement is a ViewChild which isn't initialized yet on ngOnInit.