Skip to content

Commit 422b113

Browse files
committed
fix(*): fix grid dependency for elements state component
1 parent f11d24f commit 422b113

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

projects/igniteui-angular-elements/src/lib/state.component.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ export interface IGridStateInfo {
5050
standalone: true
5151
})
5252
export class IgxGridStateComponent extends IgxGridStateBaseDirective {
53+
public override grid = inject<GridType>(IGX_GRID_BASE);
5354
/**
5455
* Restores grid features' state based on the IGridStateInfo object passed as an argument.
5556
* @param state object to restore state from.

projects/igniteui-angular/src/lib/grids/state-base.directive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ interface Feature {
121121
/* blazorIndirectRender */
122122
@Directive()
123123
export class IgxGridStateBaseDirective {
124-
public grid = inject<GridType>(IGX_GRID_BASE, { skipSelf: true, optional: true });
124+
public grid = inject<GridType>(IGX_GRID_BASE, { host: true, optional: true });
125125
protected viewRef = inject(ViewContainerRef);
126126
protected envInjector = inject(EnvironmentInjector);
127127
protected injector = inject(Injector);

0 commit comments

Comments
 (0)