Class: Cmdk::Input
Overview
Command menu search input. Port of ‘<Command.Input>` from cmdk. `id`, `aria-controls`, `aria-labelledby` and `aria-activedescendant` are wired up by the JS runtime at init.
Constant Summary
Constants inherited from Base
Instance Method Summary collapse
-
#initialize(value: nil, enterkeyhint: 'go', **attributes) ⇒ Input
constructor
‘enterkeyhint:` labels the mobile keyboard’s action key (pass nil to omit).
- #view_template ⇒ Object
Constructor Details
#initialize(value: nil, enterkeyhint: 'go', **attributes) ⇒ Input
‘enterkeyhint:` labels the mobile keyboard’s action key (pass nil to omit).
7 8 9 10 11 |
# File 'lib/cmdk/input.rb', line 7 def initialize(value: nil, enterkeyhint: 'go', **attributes) @value = value @enterkeyhint = enterkeyhint @attributes = attributes end |
Instance Method Details
#view_template ⇒ Object
13 14 15 |
# File 'lib/cmdk/input.rb', line 13 def view_template input(**merged(input_attributes, @attributes)) end |