/* Copyright © 2016-2019 Lidor Systems. All rights reserved. This file is part of the "IntegralUI Web" Library. The contents of this file are subject to the IntegralUI Web License, and may not be used except in compliance with the License. A copy of the License should have been installed in the product's root installation directory or it can be found at http://www.lidorsystems.com/products/web/studio/license-agreement.aspx. This SOFTWARE is provided "AS IS", WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language governing rights and limitations under the License. Any infringement will be prosecuted under applicable laws. */ import { Component, ViewContainerRef, ViewChild, ViewChildren, ViewEncapsulation } from '@angular/core'; import { IntegralUITreeView } from '../../integralui/components/integralui.treeview'; @Component({ selector: '', template: `
To populate the TreeView component with data, you can either load data on demand from local or remote data source or add new items dynamically when required. In order to create a new item manually, you can use some of public methods available that allows you to insert a item at specific position in the tree view. This sample demonstrates how to add new items on demand.
To add a new item use the buttons at the right side of each item. These buttons appear when you move the mouse cursor over the item space. There are three buttons:
Buttons are represented by icons, and when mouse cursor is positioned over them a tooltip will appear stating the button functionality.
After item is created, you can easily edit it by clicking on its label. A text editor will appear where you can enter a new label.
For more information check out the source code of this sample (treeview/treeview-add-items-dynamically.ts) file.