Skip to content

Commit

Permalink
fix(NbTreeGrid): Add a provide for CDK_TABLE (#3265)
Browse files Browse the repository at this point in the history
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!
  • Loading branch information
jkneepkens authored Oct 23, 2024
1 parent fd911df commit 63d1d6c
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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,
],
Expand Down

0 comments on commit 63d1d6c

Please sign in to comment.