UNPKG

@progress/kendo-angular-treelist

Version:

Kendo UI TreeList for Angular - Display hierarchical data in an Angular tree grid view that supports sorting, filtering, paging, and much more.

42 lines (41 loc) 2.34 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { ElementRef, Renderer2, NgZone } from '@angular/core'; import { LocalizationService } from '@progress/kendo-angular-l10n'; import { EditService } from './edit.service'; import { BaseCommandDirective } from './base-command.directive'; import * as i0 from "@angular/core"; /** * Represents the command for adding a new item to the TreeList. Apply this directive to any `button` element inside a [`ToolbarTemplate`](slug:toolbartemplate_treelist) or inside a [`CommandColumnComponent`]({% slug api_treelist_commandcolumncomponent %}). * * When the user clicks a button with this directive, the [`add`]({% slug api_treelist_treelistcomponent %}#toc-add) event is triggered ([see example](slug:custom_editors_editing_treelist)). * * The button with `kendoTreeListAddCommand` is automatically hidden when the row is in edit mode. * * When used in the command column, the directive takes the `cellContext` from the cell template as input. * * @example * ```html * <kendo-treelist ...> * <kendo-treelist-command-column title="command"> * <ng-template kendoTreeListCellTemplate let-cellContext="cellContext"> * <button [kendoTreeListAddCommand]="cellContext" class="k-primary">Edit</button> * </ng-template> * </kendo-treelist-command-column> * </kendo-treelist> * ``` */ export declare class AddCommandDirective extends BaseCommandDirective { /** * Provides the `cellContext` to the template. */ cellContext: any; commandClass: boolean; protected readVisible: boolean; constructor(editService: EditService, element: ElementRef, renderer: Renderer2, localization: LocalizationService, ngZone: NgZone); protected onClick(): void; static ɵfac: i0.ɵɵFactoryDeclaration<AddCommandDirective, never>; static ɵcmp: i0.ɵɵComponentDeclaration<AddCommandDirective, "[kendoTreeListAddCommand]", never, { "cellContext": { "alias": "kendoTreeListAddCommand"; "required": false; }; }, {}, never, ["*"], true, never>; }