Class: PhlexKit::ComboboxListGroup

Inherits:
BaseComponent show all
Defined in:
app/components/phlex_kit/combobox/combobox_list_group.rb

Overview

Labelled option group. Pass label: as a plain attribute — CSS renders it via ::before content(attr(label)), and the group auto-hides (pure CSS :has) when filtering leaves it with no visible items. See combobox.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ ComboboxListGroup

Returns a new instance of ComboboxListGroup.



6
7
8
# File 'app/components/phlex_kit/combobox/combobox_list_group.rb', line 6

def initialize(**attrs)
  @attrs = attrs
end

Instance Method Details

#view_templateObject



10
11
12
# File 'app/components/phlex_kit/combobox/combobox_list_group.rb', line 10

def view_template(&)
  div(**mix({ class: "pk-combobox-group", role: "group" }, @attrs), &)
end