Module: Maglev::Form::Inputs::Combobox

Included in:
FormBuilder
Defined in:
app/lib/maglev/form/inputs/combobox.rb

Instance Method Summary collapse

Instance Method Details

#combobox(method, options = {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'app/lib/maglev/form/inputs/combobox.rb', line 7

def combobox(method, options = {})
  attributes = field_attributes(method)

  @template.render(Maglev::Uikit::Form::ComboboxComponent.new(
                     label: options[:label].presence || attributes[:content],
                     name: attributes[:name],
                     search_path: options[:search_path],
                     options: combobox_component_options(method, options),
                     html_options: options[:html_options]
                   ))
end