Class: PhlexKit::ComboboxListGroup
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::ComboboxListGroup
- 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
-
#initialize(**attrs) ⇒ ComboboxListGroup
constructor
A new instance of ComboboxListGroup.
- #view_template ⇒ Object
Methods inherited from BaseComponent
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_template ⇒ Object
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 |