/* 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, ViewEncapsulation } from '@angular/core'; import { IntegralUITreeGrid } from '../../integralui/components/integralui.treegrid'; @Component({ selector: '', template: `
An example of a TreeGrid cell with a dropdown component. This is a advanced version of TreeGrid Cell with DropDown List sample.
Each cell in the fourth column displays a dropdowm icon, and when clicked a list of available options will appear. By selecting multiple options from the list, you can change the cell value.
If you click on the item checkbox, the dropdown window will remain visible. This allows you to select multiple options. To close the window, click on item label.
The list displays all options, with previously selected ones at top. This is useful when you quickly want to uncheck previous options. All functionality of the dropdown window is customizable, check out the sample source code.
For a dropdown, we are using the iuiDropDown directive, which is attachable to any HTML element or Angular component. You can add custom content in dropdown window.
For more information check out the source code of this sample (treegrid/treegrid-cell-dropdown-checked-list.ts) file.