Method: Primer::Beta::NavList#build_item
- Defined in:
- app/components/primer/beta/nav_list.rb
permalink #build_item(component_klass: Primer::Beta::NavList::Item, **system_arguments, &block) ⇒ Object
Builds a new item but does not add it to the list. Use this method instead of the ‘#with_item` slot if you need to render an item outside the context of a list, eg. if rendering additional items to append to an existing list, perhaps via a separate HTTP request.
116 117 118 119 120 121 122 123 |
# File 'app/components/primer/beta/nav_list.rb', line 116 def build_item(component_klass: Primer::Beta::NavList::Item, **system_arguments, &block) component_klass.new( list: top_level_group, selected_item_id: @selected_item_id, **system_arguments, &block ) end |