Class: PhlexKit::ComboboxEmptyState

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

Overview

"No results" placeholder — hidden until filtering empties the list. See combobox.rb.

Instance Method Summary collapse

Methods inherited from BaseComponent

#on

Constructor Details

#initialize(**attrs) ⇒ ComboboxEmptyState

Returns a new instance of ComboboxEmptyState.



5
6
7
# File 'app/components/phlex_kit/combobox/combobox_empty_state.rb', line 5

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

Instance Method Details

#view_templateObject



9
10
11
12
13
14
15
# File 'app/components/phlex_kit/combobox/combobox_empty_state.rb', line 9

def view_template(&)
  div(**mix({
    role: "presentation",
    class: "pk-combobox-empty pk-hidden",
    data: { phlex_kit__combobox_target: "emptyState" }
  }, @attrs), &)
end