Class: FoxTail::SelectComponent
Instance Attribute Summary
#html_attributes
Instance Method Summary
collapse
#initialize
classname_merger, #initialize, stimulus_merger, use_stimulus?, #with_html_attributes, #with_html_class
Methods inherited from Base
fox_tail_config
Instance Method Details
#before_render ⇒ Object
33
34
35
36
37
38
|
# File 'app/components/fox_tail/select_component.rb', line 33
def before_render
super
html_attributes[:class] = classnames theme.apply(:root, self), html_class
html_attributes[:multiple] = :multiple if html_attributes[:multiple]
end
|
#call ⇒ Object
40
41
42
43
44
45
|
# File 'app/components/fox_tail/select_component.rb', line 40
def call
capture do
concat render_hidden if html_attributes[:multiple].present? && include_hidden?
concat render_select
end
end
|
#value ⇒ Object
29
30
31
|
# File 'app/components/fox_tail/select_component.rb', line 29
def value
options[:value] ||= value_before_type_cast
end
|