From 63d1d6cb782934800c71748347cc7d7037406632 Mon Sep 17 00:00:00 2001 From: Joost Date: Wed, 23 Oct 2024 18:49:14 +0200 Subject: [PATCH] fix(NbTreeGrid): Add a provide for CDK_TABLE (#3265) Since Angular 17.1.0 and above the NbTreeGrid component wasn't working due to this missing CDK_TABLE provider and was giving this error: NullInjectorError: No provider for InjectionToken CDK_TABLE! --- src/framework/theme/components/tree-grid/tree-grid.component.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/framework/theme/components/tree-grid/tree-grid.component.ts b/src/framework/theme/components/tree-grid/tree-grid.component.ts index 63e6ae9731..c3e2ae6992 100644 --- a/src/framework/theme/components/tree-grid/tree-grid.component.ts +++ b/src/framework/theme/components/tree-grid/tree-grid.component.ts @@ -21,6 +21,7 @@ import { Optional, SkipSelf, } from '@angular/core'; +import { CDK_TABLE } from '@angular/cdk/table'; import { fromEvent, merge, Subject } from 'rxjs'; import { debounceTime, takeUntil } from 'rxjs/operators'; @@ -143,6 +144,7 @@ import { NbColumnsService } from './tree-grid-columns.service'; styleUrls: ['./tree-grid.component.scss'], providers: [ { provide: NB_TREE_GRID, useExisting: NbTreeGridComponent }, + { provide: CDK_TABLE, useExisting: NbTreeGridComponent }, NbColumnsService, ...NB_TABLE_PROVIDERS, ],