Class: Anchor::AutocompleteComponent
- Defined in:
- app/components/anchor/autocomplete_component.rb
Constant Summary collapse
- LIST_BOX_CLASSES =
%w( absolute bg-white border border-gray-300 max-h-[200px] mt-2 overflow-y-auto py-2 rounded-md shadow-lg w-full z-10 ).join(" ").freeze
Instance Method Summary collapse
-
#initialize(form_builder:, name:, src:, readonly: false, input_data: {}) ⇒ AutocompleteComponent
constructor
A new instance of AutocompleteComponent.
- #list_box_classes ⇒ Object
Methods inherited from Component
Methods included from ViewHelper
Methods included from FetchOrFallbackHelper
Constructor Details
#initialize(form_builder:, name:, src:, readonly: false, input_data: {}) ⇒ AutocompleteComponent
Returns a new instance of AutocompleteComponent.
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'app/components/anchor/autocomplete_component.rb', line 18 def initialize( form_builder:, name:, src:, readonly: false, input_data: {} ) @form_builder = form_builder @name = name @readonly = readonly @input_data = input_data @src = src super end |
Instance Method Details
#list_box_classes ⇒ Object
34 35 36 |
# File 'app/components/anchor/autocomplete_component.rb', line 34 def list_box_classes LIST_BOX_CLASSES end |