.. role:: clio-static
   :class: clio-flag clio-flag-static


####################
HoopsViewTreeElement
####################

.. js:class:: wvc.HoopsViewTreeElement

   Provides a tree view for displaying and managing saved views and view configurations.
   
   This component displays a hierarchical tree of saved views including standard views, annotation views, and combined state views. It supports lazy loading for better performance with large view sets and provides selection and navigation capabilities.
   
   
   Index
   =====
   
   .. rubric:: Constructors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wvc.HoopsViewTreeElement.constructor`
   
   .. rubric:: Properties
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:data:`~wvc.HoopsViewTreeElement.styles`
   
   .. rubric:: Accessors
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:func:`~wvc.HoopsViewTreeElement.model`
   * :js:func:`~wvc.HoopsViewTreeElement.selected`
   * :js:func:`~wvc.HoopsViewTreeElement.treeElement`
   * :js:func:`~wvc.HoopsViewTreeElement.viewAdapter`
   
   .. rubric:: Methods
   
   
   .. rst-class:: api-xref-list
   
   
   * :js:meth:`~wvc.HoopsViewTreeElement.getNodeData`
   * :js:meth:`~wvc.HoopsViewTreeElement.selectNodes`
   * :js:meth:`~wvc.HoopsViewTreeElement.setNodeData`
   * :js:meth:`~wvc.HoopsViewTreeElement.updateNodeData`
   
   



.. rst-class:: kind-group kind-constructors

.. rubric:: Constructors
   :class: kind-group-title


.. js:method:: wvc.HoopsViewTreeElement.constructor

      .. rst-class:: sig-pretty-signature
      
         | HoopsViewTreeElement(): :js:class:`HoopsViewTreeElement <wvc.HoopsViewTreeElement>`
      
      **Returns**\ : :js:class:`HoopsViewTreeElement <wvc.HoopsViewTreeElement>`
      



.. rst-class:: kind-group kind-properties

.. rubric:: Properties
   :class: kind-group-title


.. js:data:: wvc.HoopsViewTreeElement.styles

      .. rst-class:: clio-flags
      
         :clio-static:`static`
      
      .. rst-class:: sig-pretty-signature
      
         | styles: *CSSResult*\ []
      
      Array of styles to apply to the element. The styles should be defined using the ? tag function, via constructible stylesheets, or imported from native CSS module scripts.
      
      Note on Content Security Policy:
      
      Element styles are implemented with ``<style>`` tags when the browser doesn't support adopted StyleSheets. To use such ``<style>`` tags with the style-src CSP directive, the style-src value must either include 'unsafe-inline' or ``nonce-<base64-value>`` with ``<base64-value>`` replaced be a server-generated nonce.
      
      To provide a nonce to use on generated ``<style>`` elements, set ``window.litNonce`` to a server-generated nonce in your page's HTML, before loading application code:
      
      .. code-block:: html
      
         <script>
           // Generated and unique per request:
           window.litNonce = 'a1b2c3d4';
         </script>
      



.. rst-class:: kind-group kind-accessors

.. rubric:: Accessors
   :class: kind-group-title


.. js:method:: wvc.HoopsViewTreeElement.model

      .. rst-class:: sig-pretty-signature
      
         | *get* model(): (*undefined* | *IModel*\ )
      
      The IModel interface that represents the Model.
      
      This is a syntactic sugar to access HoopsViewTree.viewAdapter.model. If the ViewAdapter is not set it returns an undefined.
      
      Reassigning the model will trigger an update.
      
      Trying to set the model while the viewAdapter is not set would result in an error being thrown.
      
      This should not happen in a normal use case since the viewAdapter is added to the view tree at initialization.
      
      **Returns**\ : (*undefined* \| *IModel*\ )
      
      
         The current model instance or undefined
      
      
      .. rst-class:: sig-pretty-signature
      
         | *set* model(**model**\ : (*undefined* | *IModel*\ )): *void*
      
      Sets the model instance for view data. Setting a new model will refresh the tree view.
      
      **Parameters**
      
      
         **model**\ : (*undefined* \| *IModel*\ )
      
      
            The model instance to set
      
      
      
      **Returns**\ : *void*
      
      
      



.. js:method:: wvc.HoopsViewTreeElement.selected

      .. rst-class:: sig-pretty-signature
      
         | *get* selected(): *number*\ []
      
      Gets the currently selected view nodes.
      
      **Returns**\ : *number*\ []
      
      
         Array of selected node IDs
      
      
      .. rst-class:: sig-pretty-signature
      
         | *set* selected(**value**\ : *number*\ []): *void*
      
      Sets the currently selected view nodes.
      
      **Parameters**
      
      
         **value**\ : *number*\ []
      
      
            Array of node IDs to select
      
      
      
      **Returns**\ : *void*
      
      
      



.. js:method:: wvc.HoopsViewTreeElement.treeElement

      .. rst-class:: sig-pretty-signature
      
         | *get* treeElement(): (*undefined* | *Tree*\ )
      
      Gets the internal tree component element. Provides access to the underlying tree functionality.
      
      **Returns**\ : (*undefined* \| *Tree*\ )
      
      
         The tree element instance or undefined if not initialized
      
      



.. js:method:: wvc.HoopsViewTreeElement.viewAdapter

      .. rst-class:: sig-pretty-signature
      
         | *get* viewAdapter(): (*undefined* | *ViewAdapter*\ )
      
      Gets the view adapter that manages tree data and operations.
      
      **Returns**\ : (*undefined* \| *ViewAdapter*\ )
      
      
         The current view adapter or undefined
      
      
      .. rst-class:: sig-pretty-signature
      
         | *set* viewAdapter(**value**\ : *ViewAdapter*\ ): *void*
      
      Sets the view adapter that manages tree data and operations. The adapter handles communication between the tree component and the model.
      
      **Parameters**
      
      
         **value**\ : *ViewAdapter*
      
      
            The view adapter to set
      
      
      
      **Returns**\ : *void*
      
      
      



.. rst-class:: kind-group kind-methods

.. rubric:: Methods
   :class: kind-group-title


.. js:method:: wvc.HoopsViewTreeElement.getNodeData

      .. rst-class:: sig-pretty-signature
      
         | getNodeData(**nodeId**\ : *number*\ ): T
      
      Retrieves custom data associated with a view node.
      
      **Parameters**
      
      
         **nodeId**\ : *number*
      
      
            The ID of the node to get data from
      
      
      
      **Returns**\ : T
      
      
         The custom data stored for the node
      
      



.. js:method:: wvc.HoopsViewTreeElement.selectNodes

      .. rst-class:: sig-pretty-signature
      
         | selectNodes(**nodeIds**\ : *number*\ [], **selected**\ : *boolean*\ ): *void*
      
      Selects or deselects view nodes in the tree.
      
      **Parameters**
      
      
         **nodeIds**\ : *number*\ []
      
      
            Array of node IDs to select or deselect
      
      
         **selected**\ : *boolean*
      
      
            Whether to select (true) or deselect (false) the nodes
      
      
      
      **Returns**\ : *void*
      
      
      



.. js:method:: wvc.HoopsViewTreeElement.setNodeData

      .. rst-class:: sig-pretty-signature
      
         | setNodeData(**nodeId**\ : *number*\ , **data**\ : *unknown*\ ): *void*
      
      Sets custom data for a view node, replacing any existing data.
      
      **Parameters**
      
      
         **nodeId**\ : *number*
      
      
            The ID of the node to store data for
      
      
         **data**\ : *unknown*
      
      
            The data to store with the node
      
      
      
      **Returns**\ : *void*
      
      
      



.. js:method:: wvc.HoopsViewTreeElement.updateNodeData

      .. rst-class:: sig-pretty-signature
      
         | updateNodeData(**nodeId**\ : *number*\ , **data**\ : *unknown*\ ): *void*
      
      Merges custom data into a view node's existing data. Arrays are concatenated, objects are merged, other types replace existing data.
      
      **Parameters**
      
      
         **nodeId**\ : *number*
      
      
            The ID of the node to update data for
      
      
         **data**\ : *unknown*
      
      
            The data to merge with existing node data
      
      
      
      **Returns**\ : *void*
      
      
      




