Skip to content

Commit

Permalink
docs(utils.tree): Add API doc
Browse files Browse the repository at this point in the history
  • Loading branch information
jourdain committed Jan 23, 2023
1 parent 96b4eb5 commit 2818473
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions docs/api/source/client.utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,18 @@ The **utils** namespace is aiming to gather user friendly methods. Trame by defa
That **safe** method will strip down anything that does not serialize in a transparent manner.
This method is mainly meant for debugging or exploration as ideally you should only try to exchange between the server and the client only what is really required.

.. function:: utils.tree(obj)

Helper function to convert a JavaScript object into a vuetify.VTreeView data structure.

.. code-block:: python
state.variable_name = { ... }
# ...
with layout:
vuetify.VTreeview(items=("utils.tree(variable_name)",))
.. function:: utils.vtk.event(event)

This decorator is to handle meaningful data extraction from an event of trame.widgets.vtk.Vtk{...}View into something that can be processed on the server side.
Expand Down

0 comments on commit 2818473

Please sign in to comment.