@progress/kendo-angular-treeview
Version:
Kendo UI TreeView for Angular
56 lines (55 loc) • 2.84 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 { Observable } from 'rxjs';
import { TreeViewComponent } from '../treeview.component';
import { LoadMoreRequestArgs } from './load-more-request-args';
import * as i0 from "@angular/core";
/**
* A directive that enables the display of only a limited amount of nodes per level
* ([see example]({% slug loadmorebutton_treeview %})).
*/
export declare class LoadMoreDirective {
private treeview;
/**
* Specifies the callback that will be called when the load more button is clicked.
* Providing a function is only required when additional nodes are fetched on demand
* ([see example]({% slug loadmorebutton_treeview %}#toc-remote-data)).
*/
set loadMoreNodes(loadMoreNodes: ((loadMoreArgs: LoadMoreRequestArgs) => Observable<any[]>) | string);
/**
* Specifies the initial number of nodes that will be rendered on each level.
* Every time the load more button is clicked, the data item page size will be incremented with this number.
*/
pageSize: number;
/**
* Specifies the total number of root nodes.
* Used when additional nodes are fetched on demand
* ([see example]({% slug loadmorebutton_treeview %}#toc-remote-data)).
*/
totalRootNodes: number;
/**
* Specifies which field holds information about the total number of child nodes of the data item.
* Used when additional nodes are fetched on demand
* ([see example]({% slug loadmorebutton_treeview %}#toc-remote-data)).
*/
totalField: string;
/**
* Keeps track of the current page size of each node over expand/collapse cycles.
*/
private pageSizes;
/**
* Used as an identifier for the root page size as the root collection of nodes is not associated with a data item.
*/
private rootLevelId;
constructor(treeview: TreeViewComponent);
ngOnChanges(): void;
private verifySettings;
private getGroupSize;
private setGroupSize;
private getTotalNodesCount;
private getInitalPageSize;
static ɵfac: i0.ɵɵFactoryDeclaration<LoadMoreDirective, never>;
static ɵdir: i0.ɵɵDirectiveDeclaration<LoadMoreDirective, "[kendoTreeViewLoadMore]", never, { "loadMoreNodes": { "alias": "kendoTreeViewLoadMore"; "required": false; }; "pageSize": { "alias": "pageSize"; "required": false; }; "totalRootNodes": { "alias": "totalRootNodes"; "required": false; }; "totalField": { "alias": "totalField"; "required": false; }; }, {}, never, never, true, never>;
}