File

src/ui/tree-view/smart-tree-view.component.ts

Extends

AbstractSmartComponent

Implements

OnInit

Metadata

selector smart-tree-view
styleUrls ./smart-tree-view.component.css
templateUrl ./smart-tree-view.component.html

Index

Properties
Methods
Inputs
Accessors

Constructor

constructor(treeViewService: SmartTreeViewService, errorHandler: SmartErrorHandlerService, elementRef: ElementRef, changeDetector: ChangeDetectorRef, floatingWindowService: FloatingWindowHelperService)
Parameters :
Name Type Optional
treeViewService SmartTreeViewService No
errorHandler SmartErrorHandlerService No
elementRef ElementRef No
changeDetector ChangeDetectorRef No
floatingWindowService FloatingWindowHelperService No

Inputs

disabled
Type : boolean
height
Type : number
hide-detail-view
Type : boolean
max-height
Type : number
root-node-expanded
Type : boolean
root-node-type
Type : string
smart-column-widths
Type : string
smart-main-column-header
Type : string
smart-pane-visibility
Type : string

Methods

detailFormLoaded
detailFormLoaded()
Returns : void
disableTreeView
disableTreeView()
Returns : void
enableTreeView
enableTreeView()
Returns : void
Public handleContextMenuClick
handleContextMenuClick(menuItem: SmartTreeViewContextMenuItem)
Parameters :
Name Type Optional
menuItem SmartTreeViewContextMenuItem No
Returns : void
handleNodeRightClick
handleNodeRightClick(node: any)
Parameters :
Name Type Optional
node any No
Returns : void
handleNodeSelection
handleNodeSelection(node: SmartNode)
Parameters :
Name Type Optional
node SmartNode No
Returns : void

Properties

Public busyNodeId
Type : string
console
Default value : console
Public contextOffset
Type : object
Default value : { left: 0, top: 0, }
contextVisible
Type : boolean
detailForm
Type : SmartFormComponent
Decorators :
@ViewChild(SmartFormComponent, {static: false, read: SmartFormComponent})
Public floatingWindowService
Type : FloatingWindowHelperService
Decorators :
@Optional()
hasChildren
Default value : () => {...}
isSelected
Default value : () => {...}
loadChildren
Default value : () => {...}
Parameters :
Name
event
nodeContextMenu
Type : SmartTreeViewContextMenuItem[]
Default value : []
Public nodeLoading
Type : boolean
resizeHandles
Type : QueryList<ResizeHandleDirective>
Decorators :
@ViewChildren(ResizeHandleDirective)

Accessors

visibility
getvisibility()
Returns : string
setvisibility(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
smartColumnWidths
getsmartColumnWidths()
Returns : string
setsmartColumnWidths(value: string)
Parameters :
Name Type Optional
value string No
Returns : void
columnWidths
getcolumnWidths()
rootNodeExpandedByDefault
getrootNodeExpandedByDefault()
Returns : boolean
setrootNodeExpandedByDefault(value: boolean)
Parameters :
Name Type Optional
value boolean No
Returns : void
columnHeadersStatic
getcolumnHeadersStatic()
Returns : string[]
columnHeaders
getcolumnHeaders()
Returns : string[]
rootNode
getrootNode()
Returns : SmartNode[]
setrootNode(value: [])
Parameters :
Name Type Optional
value [] No
Returns : void
selectedNode
getselectedNode()
Returns : SmartNode
setselectedNode(value)
Parameters :
Name Optional
value No
Returns : void
detailView
getdetailView()
Returns : NodeDetailView
setdetailView(value)
Parameters :
Name Optional
value No
Returns : void
treeTableComponent
gettreeTableComponent()
Returns : TreeListComponent
    <div>    
        <smart-split-pane id="split-view" *ngIf="!hideDetailView" [visibility]="visibility || 'md,lg'">
            <div left-pane class="col-12">
                <smart-tree-list
                    [disabled]="treeDisabled"
                    [loadChildren]="loadChildren"
                    [height]="height"
                    [rootNode]="rootNode"
                    [hasChildren]="hasChildren"
                    [isSelected]="isSelected"
                    [rootNodeExpandedByDefault]="rootNodeExpandedByDefault"
                    [columnHeadersStatic]="columnHeadersStatic"
                    [columnWidths]="columnWidths"
                    [mainColumnHeader]="mainColumnHeader || ''"
                    (onNodeSelection)="handleNodeSelection($event)"
                    (onContextMenuClick)="handleContextMenuClick($event)"
                    [items]="nodeContextMenu"
                ></smart-tree-list>
                
            </div>
            <div right-pane class="col-12">
                <div #formContainer>
                    <smart-form
                        (viewLoaded)="detailFormLoaded()"
                        [smart-form-layout]="detailView && detailView.Template">
                    </smart-form>
                </div>
            </div>
        </smart-split-pane>

    </div>
    <div *ngIf="hideDetailView">
        <smart-tree-list
            [disabled]="treeDisabled"
            [loadChildren]="loadChildren"
            [height]="height"
            [rootNode]="rootNode"
            [hasChildren]="hasChildren"
            [isSelected]="isSelected"
            [rootNodeExpandedByDefault]="rootNodeExpandedByDefault"
            [columnHeadersStatic]="columnHeadersStatic"
            [columnWidths]="columnWidths"
            [mainColumnHeader]="mainColumnHeader || ''"
            (onNodeSelection)="handleNodeSelection($event)"
        ></smart-tree-list>
    </div>
        
    

./smart-tree-view.component.css

::ng-deep .tree-column.intermediate {
    border-left: 1px solid #D5D5D5 !important;
    border-right: 1px solid #D5D5D5 !important;
}

 ::ng-deep .tree-column .number {
    text-align: right !important
}

 ::ng-deep .disabled-overlay {
    position: absolute;
    background-color: lightgray;
    opacity: 0.6;
  /*  height: 100%;
    margin-left: 0px;
    margin-top: 0px;*/
    z-index: 9999
}

 ::ng-deep .context-menu-list,
.context-menu-item {
    border-radius: 0px !important;
}

 ::ng-deep .context-menu-list {
    margin: 0px !important
}

 ::ng-deep .context-menu-list p {
    margin: 0px !important;
    cursor: pointer !important;
}

 ::ng-deep .context-menu-item:hover {
    background-color: lightgray;
    text-decoration: none !important;
    cursor: pointer !important;
}

 ::ng-deep .smart-tree-body-container>p-treetable>.ui-treetable.ui-widget>.ui-treetable-tablewrapper>table>thead>tr.ui-state-default {
    display: none;
}

 ::ng-deep tbody.ui-treetable-data.ui-widget-content {
    border: 0 transparent !important;
}

 ::ng-deep .smart-tree-body-container {
    border-left: 1px solid #D5D5D5;
    border-bottom: 1px solid #D5D5D5;
    border-top: 0 transparent;
}

 ::ng-deep .resize-handle {
    position: absolute;
    margin-top: 0px;
    margin-right: 0px;
    bottom: 0;
    width: 1px;
    cursor: w-resize;
    background: #D5D5D5;
    height: 28px;
}

::ng-deep .ui-contextmenu.hidden {
    display: none !important;
}

::ng-deep .smart-tree-view-node-image {
    margin-left: 10px;
}

::ng-deep .smart-tree-view-node-label {
    margin-left: 8px;
}

::ng-deep .smart-tree-view-context-menu-container ul.k-menu {
    z-index: 9999 !important;
}

::ng-deep smart-split-pane#split-view left-pane div,
::ng-deep smart-split-pane#split-view right-pane div {
    padding: 0px !important;
}
Legend
Html element
Component
Html element with directive

result-matching ""

    No results matching ""