Class: FoxTail::Dropdown::MenuItemComponent
- Inherits:
-
ClickableComponent
- Object
- ClickableComponent
- FoxTail::Dropdown::MenuItemComponent
- Defined in:
- app/components/fox_tail/dropdown/menu_item_component.rb
Instance Method Summary collapse
Instance Method Details
#before_render ⇒ Object
42 43 44 45 46 47 48 |
# File 'app/components/fox_tail/dropdown/menu_item_component.rb', line 42 def before_render super if self.class.use_stimulus? && .key?(:autocomplete_value) FoxTail::AutocompleteComponent.append_option_action autocomplete_value, autocomplete_text, html_attributes end end |
#call ⇒ Object
50 51 52 53 54 55 56 |
# File 'app/components/fox_tail/dropdown/menu_item_component.rb', line 50 def call super do concat left_visual if left_visual? concat content concat right_visual if right_visual? end end |
#visuals? ⇒ Boolean
38 39 40 |
# File 'app/components/fox_tail/dropdown/menu_item_component.rb', line 38 def visuals? left_visual? || right_visual? end |