Skip to content

Commit

Permalink
feat: render header and footer content children
Browse files Browse the repository at this point in the history
  • Loading branch information
zewa666 committed Dec 19, 2023
1 parent 2d816da commit 9203b0b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
@@ -1,4 +1,6 @@
<div id="slickGridContainer-{{gridId}}" class="gridPane">
<ng-container *ngTemplateOutlet="slickgridHeader"></ng-container>
<div attr.id='{{gridId}}' class="slickgrid-container" style="width: 100%">
</div>
<ng-container *ngTemplateOutlet="slickgridFooter"></ng-container>
</div>
Expand Up @@ -3,13 +3,15 @@ import {
ApplicationRef,
ChangeDetectorRef,
Component,
ContentChild,
ElementRef,
EventEmitter,
Inject,
Input,
OnDestroy,
Optional,
Output,
TemplateRef,
} from '@angular/core';
import { TranslateService } from '@ngx-translate/core';
import { Observable } from 'rxjs';
Expand Down Expand Up @@ -265,6 +267,9 @@ export class AngularSlickgridComponent<TData = any> implements AfterViewInit, On
return this._registeredResources;
}

@ContentChild('slickgridHeader', { static: true }) slickgridHeader?: TemplateRef<any>;
@ContentChild('slickgridFooter', { static: true }) slickgridFooter?: TemplateRef<any>;

constructor(
protected readonly angularUtilService: AngularUtilService,
protected readonly appRef: ApplicationRef,
Expand Down

0 comments on commit 9203b0b

Please sign in to comment.