@progress/kendo-angular-gantt
Version:
Kendo UI Angular Gantt
47 lines (46 loc) • 2.56 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 } from '@angular/core';
import * as i0 from "@angular/core";
/**
* Represents the column template for edited cells in the Gantt.
*
* Use this directive to customize the content of edited cells. To define the cell template, nest an `<ng-template>`
* tag with the `kendoGanttEditTemplate` directive inside a `<kendo-gantt-column>` tag.
*
* The template context provides the following fields:
* - `column`—The current column instance.
* - `dataItem`—The current data item.
* - `cellContext`—An object for passing context information to built-in directives.
* - `formGroup`—The current [`FormGroup`](link:site.data.urls.angular['formgroupapi']). If you use the Gantt inside [Template-Driven Forms](link:site.data.urls.angular['forms']), it is `undefined`.
* - `isNew`—The state of the current item.
* - `rowIndex`—The current row index. If inside a new item row, `rowIndex` is `-1`.
*
* @example
* ```html
* <kendo-gantt-column>
* <ng-template kendoGanttEditTemplate let-dataItem="dataItem" let-formGroup="formGroup">
* <input [formControl]="formGroup.get('field')" />
* </ng-template>
* </kendo-gantt-column>
* ```
*/
export class EditTemplateDirective {
templateRef;
constructor(templateRef) {
this.templateRef = templateRef;
}
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditTemplateDirective, deps: [{ token: i0.TemplateRef, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.14", type: EditTemplateDirective, isStandalone: true, selector: "[kendoGanttEditTemplate]", ngImport: i0 });
}
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.14", ngImport: i0, type: EditTemplateDirective, decorators: [{
type: Directive,
args: [{
selector: '[kendoGanttEditTemplate]',
standalone: true
}]
}], ctorParameters: () => [{ type: i0.TemplateRef, decorators: [{
type: Optional
}] }] });