@progress/kendo-angular-treeview
Version:
Kendo UI TreeView for Angular
48 lines (47 loc) • 2.29 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
import { OnDestroy } from '@angular/core';
import { TreeViewComponent } from '../treeview.component';
import { EditService } from './models';
import * as i0 from "@angular/core";
/**
* Represents the directive that enables you to update the initially provided data array during drag-and-drop.
*
* Use this directive with one of the data-binding directives ([`kendoTreeViewHierarchyBinding`](slug:api_treeview_hierarchybindingdirective)
* or [`kendoTreeViewFlatDataBinding`](slug:api_treeview_flatdatabindingdirective)), which set their own edit handlers, or provide
* your own [`editService`](slug:api_treeview_editservice) to this directive.
*
* Providing a custom `editService` allows you to handle the
* [`addItem`](slug:api_treeview_treeviewcomponent#additem) and [`removeItem`](slug:api_treeview_treeviewcomponent#removeitem)
* events when they are triggered by the TreeView component.
*
* @example
* ```html
* <kendo-treeview
* kendoTreeViewDragAndDrop
* kendoTreeViewDragAndDropEditing
* [nodes]="nodes"
* textField="text">
* </kendo-treeview>
* ```
*
* @remarks
* Applied to: {@link TreeViewComponent}
*/
export declare class DragAndDropEditingDirective implements OnDestroy {
private treeview;
/**
* Specifies the handlers called on drag-and-drop [`addItem`](slug:api_treeview_treeviewcomponent#additem)
* and [`removeItem`](slug:api_treeview_treeviewcomponent#removeitem) events.
*/
set editService(service: EditService);
private subscriptions;
constructor(treeview: TreeViewComponent);
ngOnDestroy(): void;
private handleAdd;
private handleRemove;
static ɵfac: i0.ɵɵFactoryDeclaration<DragAndDropEditingDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<DragAndDropEditingDirective, "[kendoTreeViewDragAndDropEditing]", never, { "editService": { "alias": "editService"; "required": false; }; }, {}, never, never, true, never>;
}