Class: ShadcnPhlexcomponents::ComboboxListContainer

Inherits:
Base
  • Object
show all
Defined in:
lib/shadcn_phlexcomponents/components/combobox.rb

Constant Summary

Constants inherited from Base

Base::SANITIZER_ALLOWED_ATTRIBUTES, Base::SANITIZER_ALLOWED_TAGS, Base::TAILWIND_MERGER

Instance Method Summary collapse

Methods inherited from Base

#before_template, #convert_collection_hash_to_struct, #find_as_child, #icon, #item_disabled?, #merge_default_attributes, #merged_as_child_attributes, #nokogiri_attributes_to_hash, #overlay, #sanitize_as_child

Constructor Details

#initialize(aria_id: nil, search_placeholder_text: nil, **attributes) ⇒ ComboboxListContainer

Returns a new instance of ComboboxListContainer.



553
554
555
556
557
# File 'lib/shadcn_phlexcomponents/components/combobox.rb', line 553

def initialize(aria_id: nil, search_placeholder_text: nil, **attributes)
  @aria_id = aria_id
  @search_placeholder_text = search_placeholder_text
  super(**attributes)
end

Instance Method Details

#default_attributes ⇒ Object



559
560
561
# File 'lib/shadcn_phlexcomponents/components/combobox.rb', line 559

def default_attributes
  { data: { combobox_target: "listContainer" } }
end

#view_template ⇒ Object



563
564
565
# File 'lib/shadcn_phlexcomponents/components/combobox.rb', line 563

def view_template(&)
  div(**@attributes, &)
end