@progress/kendo-angular-grid
Version:
Kendo UI Grid for Angular - high performance data grid with paging, filtering, virtualization, CRUD, and more.
56 lines (55 loc) • 2.53 kB
JavaScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { Directive, TemplateRef, Optional, Input } from '@angular/core';
import * as i0 from "@angular/core";
/**
* Represents the toolbar template of the Grid.
*
* The template context has the following field:
* - `position`—The position at which the toolbar template is rendered. The possible values are `top`, `bottom`, and `both`.
*
* @example
* ```html
* <kendo-grid [data]="gridData" style="height: 200px">
* <ng-template kendoGridToolbarTemplate [position]="position" let-position="position">
* <button (click)="onClick()">Custom action</button>
* </ng-template>
* <kendo-grid-column field="ProductName">
* </kendo-grid-column>
* </kendo-grid>
* ```
*/
export class ToolbarTemplateDirective {
templateRef;
_position = 'top';
/**
* The position of the toolbar ([see example]({% slug toolbartemplate_grid %}#toc-setting-the-toolbar-position)).
*
* @default 'top'
*/
set position(position) {
this._position = position;
}
get position() {
return this._position;
}
constructor(templateRef) {
this.templateRef = templateRef;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: ToolbarTemplateDirective, isStandalone: true, selector: "[kendoGridToolbarTemplate]", inputs: { position: "position" }, ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: ToolbarTemplateDirective, decorators: [{
type: Directive,
args: [{
selector: '[kendoGridToolbarTemplate]',
standalone: true
}]
}], ctorParameters: function () { return [{ type: i0.TemplateRef, decorators: [{
type: Optional
}] }]; }, propDecorators: { position: [{
type: Input,
args: ["position"]
}] } });