Class: FoxTail::Dropdown::MenuComponent

Inherits:
BaseComponent
  • Object
show all
Defined in:
app/components/fox_tail/dropdown/menu_component.rb

Instance Method Summary collapse

Instance Method Details

#before_renderObject



50
51
52
53
54
# File 'app/components/fox_tail/dropdown/menu_component.rb', line 50

def before_render
  super

  html_attributes[:class] = classnames theme.apply(:root, self), html_class
end

#callObject



56
57
58
59
60
61
# File 'app/components/fox_tail/dropdown/menu_component.rb', line 56

def call
   :div, html_attributes do
    concat header if header?
    concat render_list
  end
end

#objectify_options(options) ⇒ Object



63
64
65
# File 'app/components/fox_tail/dropdown/menu_component.rb', line 63

def objectify_options(options)
  super.merge name: name, value: value, multiple: multiple?
end

#render?Boolean

Returns:

  • (Boolean)


46
47
48
# File 'app/components/fox_tail/dropdown/menu_component.rb', line 46

def render?
  items?
end