Class: RubyUI::ComboboxInputTrigger
- Defined in:
- lib/ruby_ui/combobox/combobox_input_trigger.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(placeholder: "") ⇒ ComboboxInputTrigger
constructor
A new instance of ComboboxInputTrigger.
- #view_template ⇒ Object
Constructor Details
#initialize(placeholder: "") ⇒ ComboboxInputTrigger
Returns a new instance of ComboboxInputTrigger.
5 6 7 8 |
# File 'lib/ruby_ui/combobox/combobox_input_trigger.rb', line 5 def initialize(placeholder: "", **) @placeholder = placeholder super(**) end |
Instance Method Details
#view_template ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
# File 'lib/ruby_ui/combobox/combobox_input_trigger.rb', line 10 def view_template div(**attrs) do input( type: "text", placeholder: @placeholder, autocomplete: "off", autocorrect: "off", spellcheck: "false", class: "flex-1 border-0 px-0 bg-transparent outline-none focus:ring-0 placeholder:text-muted-foreground text-sm disabled:cursor-not-allowed", data: { ruby_ui__combobox_target: "inputTrigger", action: "keyup->ruby-ui--combobox#filterItems input->ruby-ui--combobox#filterItems" } ) chevron_icon end end |