mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-23 01:03:21 +00:00
Fix specs:
Fix tom_select_options_value to conditionally include 'virtual_scroll' plugin based on remote URL presence
This commit is contained in:
@@ -46,7 +46,8 @@ class SearchableDropdownComponent < ViewComponent::Base
|
||||
end
|
||||
|
||||
def tom_select_options_value
|
||||
plugins = ['virtual_scroll']
|
||||
plugins = []
|
||||
plugins << 'virtual_scroll' if @remote_url.present?
|
||||
plugins << 'dropdown_input' unless remove_search_plugin?
|
||||
plugins << 'remove_button' if multiple
|
||||
|
||||
|
||||
Reference in New Issue
Block a user