UNPKG

@progress/kendo-angular-dropdowns

Version:

A wide variety of native Angular dropdown components including AutoComplete, ComboBox, DropDownList, DropDownTree, MultiColumnComboBox, MultiSelect, and MultiSelectTree

55 lines (54 loc) 2.73 kB
/**----------------------------------------------------------------------------------------- * Copyright © 2025 Progress Software Corporation. All rights reserved. * Licensed under commercial license. See LICENSE.md in the project root for more information *-------------------------------------------------------------------------------------------*/ import { Directive, Input } from '@angular/core'; import { isChanged } from '@progress/kendo-angular-common'; import { DataBoundComponent, HierarchyBindingDirective } from '@progress/kendo-angular-treeview'; import * as i0 from "@angular/core"; import * as i1 from "@progress/kendo-angular-treeview"; /** * A directive which encapsulates the retrieval of the child nodes when hierarchical data is provided. */ export class DropDownTreeHierarchyBindingDirective extends HierarchyBindingDirective { dropDownTree; /** * The nodes which will be displayed by the DropDownTree. */ set nodes(nodes) { // Needs to be a setter so that it matches the accessor in FlatDataBindingDirective it extends this._nodes = nodes; } get nodes() { return this._nodes; } /** * @hidden */ set filter(term) { super.filter = term; } constructor(dropDownTree) { super(dropDownTree); this.dropDownTree = dropDownTree; } ngOnChanges(changes) { if (isChanged('nodes', changes, false)) { this.dropDownTree.nodes = changes['nodes'].currentValue; super.nodes = changes['nodes'].currentValue; } super.ngOnChanges(changes); } static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropDownTreeHierarchyBindingDirective, deps: [{ token: i1.DataBoundComponent }], target: i0.ɵɵFactoryTarget.Directive }); static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "16.2.12", type: DropDownTreeHierarchyBindingDirective, isStandalone: true, selector: "[kendoDropDownTreeHierarchyBinding]", inputs: { nodes: ["kendoDropDownTreeHierarchyBinding", "nodes"] }, usesInheritance: true, usesOnChanges: true, ngImport: i0 }); } i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "16.2.12", ngImport: i0, type: DropDownTreeHierarchyBindingDirective, decorators: [{ type: Directive, args: [{ selector: '[kendoDropDownTreeHierarchyBinding]', standalone: true }] }], ctorParameters: function () { return [{ type: i1.DataBoundComponent }]; }, propDecorators: { nodes: [{ type: Input, args: ['kendoDropDownTreeHierarchyBinding'] }] } });