Class: List::TreeComponent

Inherits:
Trek::Component
  • Object
show all
Defined in:
app/components/trek/list/tree_component.rb

Instance Method Summary collapse

Instance Method Details

#callObject



9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'app/components/trek/list/tree_component.rb', line 9

def call
  tag.div(
    class: classes,
    data: {
      controller: identifier,
      "trek--list--tree-reorderable-value": reorderable,
      target: stimulus_target("subtree")
    }
  ) do
    tree.each do |node|
      concat render_node(node)
    end
  end
end