Open DJEnterprise opened 4 years ago
Also experiencing this issue in Angular 10.0.1. Even the basic NbTreeGrid example in the Nebular docs does not work
Edit: Fixed by downgrading @angular/cdk to version 9.2.4
Seems that the team worked hard to deliver the fix. Version 6 seems to fix the issue. @DJEnterprise @gvonhagel try updating to Nebular 6.0.0
Just updated my project and it works fine
Thanks @n0th1ng-else for looking into this. The issue seem to have fixed now.
This issue isn't fixed I guess, I'm getting below error
ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'nativeElement' of null
TypeError: Cannot read property 'nativeElement' of null
at new CdkTable (table.js:formatted:1)
at new NbTable (table.js:formatted:1)
at new NbTreeGridComponent (table.js:formatted:1)
at NodeInjectorFactory.NbTreeGridComponent_Factory [as factory] (table.js:formatted:1)
at getNodeInjectable (table.js:formatted:1)
at instantiateAllDirectives (table.js:formatted:1)
at createDirectivesInstances (table.js:formatted:1)
at ɵɵelementStart (table.js:formatted:1)
at StudentDetailsComponent_Template (template.html:59)
at executeTemplate (table.js:formatted:1)
at resolvePromise (zone.js:1215)
at resolvePromise (zone.js:1165)
at zone.js:1277
at ZoneDelegate.invokeTask (zone.js:407)
at Object.onInvokeTask (table.js:formatted:1)
at ZoneDelegate.invokeTask (zone.js:406)
at Zone.runTask (zone.js:179)
at drainMicroTaskQueue (zone.js:583)
at ZoneTask.invokeTask [as invoke] (zone.js:492)
at invokeTask (zone.js:1598)
Issue type
I'm submitting a ... (check one with "x")
Issue description
I am trying to use Tree Grid component alone in my web application. But the table doesn't get displayed when the page gets loaded with below error.
core.js:4081 ERROR TypeError: Cannot read property 'elementRef' of undefined at NbTreeGridComponent._applyNativeTableSections (table.js:1743) at NbTreeGridComponent.ngOnInit (table.js:1250) at callHook (core.js:2922) at callHooks (core.js:2892) at executeInitAndCheckHooks (core.js:2844) at selectIndexInternal (core.js:6051) at Module.ɵɵadvance (core.js:6024) at TreetableComponent_Template (treetable.component.html:9) at executeTemplate (core.js:7329) at refreshView (core.js:7198) defaultErrorLogger @ core.js:4081 handleError @ core.js:4129 (anonymous) @ core.js:28062 invoke @ zone-evergreen.js:364 run @ zone-evergreen.js:123 runOutsideAngular @ core.js:27065 tick @ core.js:28062 _loadComponent @ core.js:28088 bootstrap @ core.js:28029 (anonymous) @ core.js:27731 _moduleDoBootstrap @ core.js:27731 (anonymous) @ core.js:27701 invoke @ zone-evergreen.js:364 onInvoke @ core.js:27138 invoke @ zone-evergreen.js:363 run @ zone-evergreen.js:123 (anonymous) @ zone-evergreen.js:857 invokeTask @ zone-evergreen.js:399 onInvokeTask @ core.js:27126 invokeTask @ zone-evergreen.js:398 runTask @ zone-evergreen.js:167 drainMicroTaskQueue @ zone-evergreen.js:569 Promise.then (async) scheduleMicroTask @ zone-evergreen.js:552 scheduleTask @ zone-evergreen.js:388 scheduleTask @ zone-evergreen.js:210 scheduleMicroTask @ zone-evergreen.js:230 scheduleResolveOrReject @ zone-evergreen.js:847 then @ zone-evergreen.js:979 bootstrapModule @ core.js:27726 ./src/main.ts @ main.ts:11 webpack_require @ bootstrap:78 0 @ main.ts:12 webpack_require @ bootstrap:78 checkDeferredModules @ bootstrap:44 webpackJsonpCallback @ bootstrap:31 (anonymous) @ main.js:1 core.js:26534 Angular is running in development mode. Call enableProdMode() to enable production mode. core.js:4081 ERROR TypeError: Cannot read property 'classList' of null at StickyStyler._addStickyStyle (table.js:826) at StickyStyler.updateStickyFooterContainer (table.js:799) at NbTreeGridComponent.updateStickyFooterRowStyles (table.js:1417) at NbTreeGridComponent._forceRenderFooterRows (table.js:1621) at NbTreeGridComponent.ngAfterContentChecked (table.js:1276) at callHook (core.js:2926) at callHooks (core.js:2892) at executeInitAndCheckHooks (core.js:2844) at refreshView (core.js:7239) at refreshComponent (core.js:8335)
Current behavior: When trying to load the tree grid component.
Expected behavior:
Just display the tree grid component in UI with sample data.
Steps to reproduce:
Related code:
Other information:
npm, node, OS, Browser
Angular, Nebular