Class: Filter::Component

Inherits:
Lookbook::BaseComponent
  • Object
show all
Defined in:
app/components/lookbook/filter/component.rb

Instance Method Summary collapse

Constructor Details

#initialize(store: nil, placeholder: "Type to filter…", **html_attrs) ⇒ Component

Returns a new instance of Component.



3
4
5
6
7
# File 'app/components/lookbook/filter/component.rb', line 3

def initialize(store: nil, placeholder: "Type to filter…", **html_attrs)
  @model = store.nil? ? "{}" : "#{store}.raw"
  @placeholder = placeholder
  super(alpine_data: store, **html_attrs)
end