Class: PhlexKit::CommandList
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::CommandList
- Defined in:
- app/components/phlex_kit/command/command_list.rb
Overview
Container for CommandGroups, with dividers between them. Carries the listbox role and an id the controller points the input's aria-controls at (and derives result ids from, for aria-activedescendant). See command.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ CommandList
constructor
A new instance of CommandList.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ CommandList
Returns a new instance of CommandList.
6 7 8 |
# File 'app/components/phlex_kit/command/command_list.rb', line 6 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'app/components/phlex_kit/command/command_list.rb', line 10 def view_template(&) div(**mix({ id: "pk-command-list-#{SecureRandom.hex(4)}", class: "pk-command-list", role: "listbox", data: { phlex_kit__command_target: "list" } }, @attrs), &) end |