Class: PhlexKit::CommandEmpty
- Inherits:
-
BaseComponent
- Object
- Phlex::HTML
- BaseComponent
- PhlexKit::CommandEmpty
- Defined in:
- app/components/phlex_kit/command/command_empty.rb
Overview
"No results" row — revealed by the controller only when a filter matches nothing. Server-rendered with pk-hidden so an inline palette doesn't flash "No results" under its items before Stimulus connects, and doesn't show it permanently with JS disabled. See command.rb.
Instance Method Summary collapse
-
#initialize(**attrs) ⇒ CommandEmpty
constructor
A new instance of CommandEmpty.
- #view_template ⇒ Object
Methods inherited from BaseComponent
Constructor Details
#initialize(**attrs) ⇒ CommandEmpty
Returns a new instance of CommandEmpty.
7 8 9 |
# File 'app/components/phlex_kit/command/command_empty.rb', line 7 def initialize(**attrs) @attrs = attrs end |
Instance Method Details
#view_template ⇒ Object
11 12 13 14 15 16 17 |
# File 'app/components/phlex_kit/command/command_empty.rb', line 11 def view_template(&) div(**mix({ class: "pk-command-empty pk-hidden", role: "presentation", data: { phlex_kit__command_target: "empty" } }, @attrs), &) end |