Class: Anchor::Autocomplete::ResultsComponent

Inherits:
Component
  • Object
show all
Defined in:
app/components/anchor/autocomplete/results_component.rb

Constant Summary collapse

Result =
Data.define(:text, :value, :data)

Constants included from ViewHelper

ViewHelper::ANCHOR_HELPERS

Instance Method Summary collapse

Methods inherited from Component

generate_id

Methods included from ViewHelper

#anchor_form_with, #anchor_svg, #deep_blank?, #merge_options, #popover_trigger_attributes

Methods included from FetchOrFallbackHelper

#fetch_or_fallback

Constructor Details

#initialize(data:, **kwargs) ⇒ ResultsComponent

Returns a new instance of ResultsComponent.



6
7
8
9
10
# File 'app/components/anchor/autocomplete/results_component.rb', line 6

def initialize(data:, **kwargs)
  @data = data

  super(**kwargs)
end