Clarity.TreeComponent (Clarity v0.5.1)

Copy Markdown View Source

A lazy-loading navigation tree component that only renders visible nodes.

This component maintains user-opened branches across graph updates and only renders nodes that are visible (root, breadcrumb path, and user-opened branches).

Summary

Functions

render(assigns)

Callback implementation for Phoenix.LiveComponent.render/1.

render_node(assigns)

@spec render_node(map()) :: Phoenix.LiveView.Rendered.t()

Attributes

  • graph (:any) (required)
  • vertex (:any) (required)
  • visible_ids (:any) (required)
  • active_vertex (:any) (required)
  • prefix (:string) (required)
  • lens (Clarity.Perspective.Lens) (required)
  • myself (:any) (required)
  • any_sibling_has_children (:boolean) (required)

render_vertex(assigns)

@spec render_vertex(map()) :: Phoenix.LiveView.Rendered.t()

Attributes

  • graph (:any) (required)
  • vertex (:any) (required)
  • visible_ids (:any) (required)
  • active_vertex (:any) (required)
  • prefix (:string) (required)
  • lens (Clarity.Perspective.Lens) (required)
  • myself (:any) (required)