@progress/kendo-angular-treeview
Version:
Kendo UI TreeView for Angular
49 lines (48 loc) • 2.08 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 { ChangeDetectorRef, OnChanges } from '@angular/core';
import { TreeViewComponent } from './treeview.component';
import { TreeItem } from './treeitem.interface';
import * as i0 from "@angular/core";
/**
* Represents a directive which manages the disabled in-memory state of the TreeView node
* ([see example]({% slug disabledstate_treeview %})).
*
* @example
* ```html
* <kendo-treeview
* [nodes]="data"
* textField="text"
* [hasChildren]="hasChildren"
* [children]="fetchChildren"
* kendoTreeViewDisable
* [disabledKeys]="disabledKeys">
* </kendo-treeview>
* ```
*
* @remarks
* Applied to: {@link TreeViewComponent}
*/
export declare class DisableDirective implements OnChanges {
protected treeView: TreeViewComponent;
protected cdr: ChangeDetectorRef;
/**
* @hidden
*/
set isDisabled(value: (item: object, index: string) => boolean);
/**
* Defines the item key that will be stored in the `disabledKeys` collection.
*/
disableKey: string | ((context: TreeItem) => any);
/**
* Defines the collection that will store the disabled keys.
*/
disabledKeys: any[];
constructor(treeView: TreeViewComponent, cdr: ChangeDetectorRef);
ngOnChanges(changes?: any): void;
protected itemKey(e: any): any;
static ɵfac: i0.ɵɵFactoryDeclaration<DisableDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<DisableDirective, "[kendoTreeViewDisable]", never, { "isDisabled": { "alias": "isDisabled"; "required": false; }; "disableKey": { "alias": "kendoTreeViewDisable"; "required": false; }; "disabledKeys": { "alias": "disabledKeys"; "required": false; }; }, {}, never, never, true, never>;
}