Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • VertexSceneTree

Index

Properties

config?: string | Config

An object to configure the scene tree.

configEnv: Environment

Sets the default environment for the viewer. This setting is used for auto-configuring network hosts.

Use the config property for manually setting hosts.

controller?: SceneTreeController
metadataKeys: string[]

A list of part metadata keys that will be made available to each row. This metadata can be used for data binding inside the scene tree's template.

metadataSearchExactMatch: boolean
deprecated

Use searchOptions Indicates whether the metadata search should use an exact match.

metadataSearchKeys: string[]
deprecated

Use searchOptions A list of the metadata keys that a scene tree search should be performed on.

overScanCount: number

The number of offscreen rows above and below the viewport to render. Having a higher number reduces the chance of the browser not displaying a row while scrolling.

rowData?: RowDataProvider

A callback that is invoked immediately before a row is about to rendered. This callback can return additional data that can be bound to in a template.

example
<script>
const table = document.querySelector('vertex-scene-tree-table');
table.rowData = (row) => {
return { func: () => console.log('row', row.node.name) };
};
</script>
<vertex-scene-tree>
<vertex-scene-tree-table>
<vertex-scene-tree-table-column>
<template> <button event:click="{{row.data.func}}">Hi</button> </template>
</vertex-scene-tree-table-column>
</vertex-scene-tree-table>
</vertex-scene-tree>
searchOptions: FilterOptions

A set of options to configure scene tree searching behavior.

viewer?: null | HTMLVertexViewerElement

An instance of a <vertex-viewer> element. Either this property or viewerSelector must be set.

viewerSelector?: string

A CSS selector that points to a <vertex-viewer> element. Either this property or viewer must be set.

Methods

  • collapseAll(): Promise<void>
  • collapseItem(row: RowArg): Promise<void>
  • Performs an API call that will collapse the node associated to the specified row or row index.

    Parameters

    • row: RowArg

      A row, row index, or node to collapse.

    Returns Promise<void>

  • deselectItem(row: RowArg): Promise<void>
  • Performs an API call that will deselect the item associated to the given row or row index.

    Parameters

    • row: RowArg

      The row, row index, or node to deselect.

    Returns Promise<void>

  • expandAll(): Promise<void>
  • expandItem(row: RowArg): Promise<void>
  • fetchMetadataKeys(): Promise<string[]>
  • Fetches the metadata keys that are available to the scene tree. Metadata keys can be assigned to the scene tree using the metadataKeys property. The scene tree will fetch this metadata and make these values available for data binding.

    Returns Promise<string[]>

    A promise that resolves with the names of available keys.

  • Performs an async request that will filter the displayed items in the tree that match the given term and options.

    Parameters

    • term: string

      The filter term.

    • Optional options: FilterTreeOptions

      The options to apply to the filter.

    Returns Promise<void>

    A promise that completes when the request has completed. Note, items are displayed asynchronously. So the displayed items may not reflect the result of this filter when the promise completes.

  • getRowAtClientY(clientY: number): Promise<Row>
  • Returns the row data from the given vertical client position.

    Parameters

    • clientY: number

      The vertical client position.

    Returns Promise<Row>

    A row or undefined if the row hasn't been loaded.

  • getRowAtIndex(index: number): Promise<Row>
  • Returns a row at the given index. If the row data has not been loaded, returns undefined.

    Parameters

    • index: number

      The index of the row.

    Returns Promise<Row>

    A row, or undefined if the row hasn't been loaded.

  • getRowForEvent(event: MouseEvent | PointerEvent): Promise<Row>
  • Returns the row data from the given mouse or pointer event. The event must originate from a vertex-scene-tree-table-cell contained by this element, otherwise undefined is returned.

    Parameters

    • event: MouseEvent | PointerEvent

      A mouse or pointer event that originated from this component.

    Returns Promise<Row>

    A row, or undefined if the row hasn't been loaded.

  • hideItem(row: RowArg): Promise<void>
  • invalidateRows(): Promise<void>
  • Schedules a render of the rows in the scene tree. Useful if any custom data in your scene tree has changed, and you want to update the row's contents.

    Note: This is an asynchronous operation. The update may happen on the next frame.

    Returns Promise<void>

  • Scrolls the tree to an item with the given ID. If the node for the item is not expanded, the tree will expand each of its parent nodes.

    Parameters

    • itemId: string

      An ID of an item to scroll to.

    • Optional options: ScrollToOptions

      A set of options to configure the scrolling behavior.

    Returns Promise<void>

    A promise that resolves when the operation is finished.

  • Performs an API call that will select the item associated to the given row or row index.

    This method supports a recurseParent option that allows for recursively selecting the next unselected parent node. This behavior is considered stateful. Each call to selectItem will track the ancestry of the passed in rowArg. If calling selectItem with a row not belonging to the ancestry of a previous selection, then this method will perform a standard selection.

    Parameters

    • row: RowArg

      The row, row index or node to select.

    • Optional options: SelectItemOptions

      A set of options to configure selection behavior.

    Returns Promise<void>

  • showItem(row: RowArg): Promise<void>
  • toggleExpandItem(row: RowArg): Promise<void>
  • Performs an API call that will either expand or collapse the node associated to the given row or row index.

    Parameters

    • row: RowArg

      The row, row index, or node to collapse or expand.

    Returns Promise<void>

  • toggleItemVisibility(row: RowArg): Promise<void>
  • Performs an API call that will either hide or show the item associated to the given row or row index.

    Parameters

    • row: RowArg

      The row, row index, or node to toggle visibility.

    Returns Promise<void>