Class: StimulusPlumbers::Components::Combobox::Autocomplete
- Inherits:
-
Plumber::Base
- Object
- Plumber::Base
- StimulusPlumbers::Components::Combobox::Autocomplete
- Defined in:
- lib/stimulus_plumbers/components/combobox/autocomplete.rb
Constant Summary
Constants included from Plumber::HtmlOptions
Plumber::HtmlOptions::STIMULUS_SPACEJOIN_KEYS
Instance Attribute Summary
Attributes inherited from Plumber::Base
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Plumber::Base
Methods included from Plumber::HtmlOptions
#extract_classes, #merge_data_options, #merge_html_options, #merge_string_option, #normalize_part
Constructor Details
This class inherits a constructor from StimulusPlumbers::Plumber::Base
Class Method Details
.default_opts ⇒ Object
7 8 9 10 11 |
# File 'lib/stimulus_plumbers/components/combobox/autocomplete.rb', line 7 def self.default_opts Dropdown.default_opts.deep_merge( trigger: { aria_autocomplete: "list", readonly: false } ) end |
Instance Method Details
#render(options: [], value: nil, label: nil, labelledby: nil) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'lib/stimulus_plumbers/components/combobox/autocomplete.rb', line 13 def render(options: [], value: nil, label: nil, labelledby: nil) template.safe_join( [ Dropdown.new(template).render(options: , value: value, label: label, labelledby: labelledby), loading, empty ] ) end |