Class: StimulusPlumbers::Components::Combobox::Dropdown
- Inherits:
-
Plumber::Base
- Object
- Plumber::Base
- StimulusPlumbers::Components::Combobox::Dropdown
- Defined in:
- lib/stimulus_plumbers/components/combobox/dropdown.rb
Constant Summary collapse
- STIMULUS_CONTROLLER =
"combobox-dropdown"- STIMULUS_ACTION =
[ "click->#{STIMULUS_CONTROLLER}#select", "keydown->#{STIMULUS_CONTROLLER}#onNavigate", "#{STIMULUS_CONTROLLER}:selected->#{Combobox::STIMULUS_CONTROLLER}#onSelect" ].join(" ").freeze
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
14 15 16 17 18 19 20 21 22 |
# File 'lib/stimulus_plumbers/components/combobox/dropdown.rb', line 14 def self.default_opts { popover: { tag: :div, haspopup: "listbox", data: { controller: STIMULUS_CONTROLLER, action: STIMULUS_ACTION } } } end |
Instance Method Details
#render ⇒ Object
24 25 26 |
# File 'lib/stimulus_plumbers/components/combobox/dropdown.rb', line 24 def render(...) render_dropdown(...) end |