Class: Primer::Forms::Dsl::AutoCompleteInput
- Defined in:
- app/lib/primer/forms/dsl/auto_complete_input.rb
Overview
:nodoc:
Constant Summary
Constants inherited from Input
Input::DEFAULT_INPUT_WIDTH, Input::DEFAULT_SIZE, Input::INPUT_WIDTH_MAPPINGS, Input::INPUT_WIDTH_OPTIONS, Input::SIZE_MAPPINGS, Input::SIZE_OPTIONS, Input::SPACE_DELIMITED_ARIA_ATTRIBUTES
Instance Attribute Summary collapse
-
#block ⇒ Object
readonly
Returns the value of attribute block.
-
#label ⇒ Object
readonly
Returns the value of attribute label.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
Attributes inherited from Input
#base_id, #builder, #caption, #form, #form_control, #ids, #input_arguments, #label_arguments, #validation_message
Instance Method Summary collapse
-
#focusable? ⇒ Boolean
The AutoComplete Primer component does not allow auto-focusing.
-
#initialize(name:, label:, **system_arguments, &block) ⇒ AutoCompleteInput
constructor
A new instance of AutoCompleteInput.
- #to_component ⇒ Object
- #type ⇒ Object
Methods inherited from Input
#add_input_aria, #add_input_classes, #add_input_data, #add_label_classes, #autofocus!, #caption?, #caption_id, #caption_template?, #disabled?, #full_width?, #hidden?, #id, #input?, #input_width, #invalid?, #merge_input_arguments!, #remove_input_data, #render_caption_template, #required?, #size, #supports_validation?, #valid?, #validation_arguments, #validation_error_icon_target, #validation_id, #validation_message_arguments, #validation_messages, #validation_success_icon_target, #value, #values_disambiguate_template_names?
Methods included from ClassNameHelper
Constructor Details
#initialize(name:, label:, **system_arguments, &block) ⇒ AutoCompleteInput
Returns a new instance of AutoCompleteInput.
10 11 12 13 14 15 16 |
# File 'app/lib/primer/forms/dsl/auto_complete_input.rb', line 10 def initialize(name:, label:, **system_arguments, &block) @name = name @label = label @block = block super(**system_arguments) end |
Instance Attribute Details
#block ⇒ Object (readonly)
Returns the value of attribute block.
8 9 10 |
# File 'app/lib/primer/forms/dsl/auto_complete_input.rb', line 8 def block @block end |
#label ⇒ Object (readonly)
Returns the value of attribute label.
8 9 10 |
# File 'app/lib/primer/forms/dsl/auto_complete_input.rb', line 8 def label @label end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
8 9 10 |
# File 'app/lib/primer/forms/dsl/auto_complete_input.rb', line 8 def name @name end |
Instance Method Details
#focusable? ⇒ Boolean
The AutoComplete Primer component does not allow auto-focusing
27 28 29 |
# File 'app/lib/primer/forms/dsl/auto_complete_input.rb', line 27 def focusable? false end |
#to_component ⇒ Object
18 19 20 |
# File 'app/lib/primer/forms/dsl/auto_complete_input.rb', line 18 def to_component AutoComplete.new(input: self) end |
#type ⇒ Object
22 23 24 |
# File 'app/lib/primer/forms/dsl/auto_complete_input.rb', line 22 def type :autocomplete end |