Class: Form::Combobox::AsyncSearchResult
- Inherits:
-
UI::Base
- Object
- UI::Base
- Form::Combobox::AsyncSearchResult
- Defined in:
- app/views/form/combobox/async_search_result.rb
Instance Method Summary collapse
Instance Method Details
#view_template ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/views/form/combobox/async_search_result.rb', line 6 def view_template if results.any? results.each do |result| render Form::Combobox::Choice.new(choice: result, text_method:, value_method:) end else li(class: "tw:px-4 tw:py-2 tw:text-gray-500 tw:text-sm tw:italic") do "No results" end end end |