@progress/kendo-angular-treeview
Version:
Kendo UI TreeView for Angular
52 lines (51 loc) • 1.42 kB
TypeScript
/**-----------------------------------------------------------------------------------------
* Copyright © 2025 Progress Software Corporation. All rights reserved.
* Licensed under commercial license. See LICENSE.md in the project root for more information
*-------------------------------------------------------------------------------------------*/
/**
* Represents the available selection modes of the TreeView component.
*
* @example
* ```ts
*
* _@Component({
* selector: 'my-app',
* template: `
* <kendo-treeview
* [nodes]="data"
*
* [kendoTreeViewSelectable]="{ mode: 'multiple' }"
*
* kendoTreeViewExpandable
* kendoTreeViewHierarchyBinding
* childrenField="items"
* textField="text"
* >
* </kendo-treeview>
* <i>Press ENTER key or use mouse click to select an item</i>
* `
* })
*
* class AppComponent {
* public data: any[] = [
* {
* text: "Furniture", items: [
* { text: "Tables & Chairs" },
* { text: "Sofas" },
* {
* text: "Occasional Furniture", items: [{
* text: "Decor", items: [
* { text: "Bed Linen" },
* { text: "Curtains & Blinds" },
* { text: "Carpets" }
* ]
* }]
* }
* ]
* }
* ];
* }
*
* ```
*/
export type SelectionMode = "single" | "multiple";