From 8eb9709a04866448d1bde820d6ede71428709149 Mon Sep 17 00:00:00 2001 From: Ahmed Ejaz Date: Sun, 1 Feb 2026 19:45:39 +0500 Subject: [PATCH] Fix specs: Fix tom_select_options_value to conditionally include 'virtual_scroll' plugin based on remote URL presence --- app/components/searchable_dropdown_component.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/components/searchable_dropdown_component.rb b/app/components/searchable_dropdown_component.rb index c6a6852edf..67a785edaf 100644 --- a/app/components/searchable_dropdown_component.rb +++ b/app/components/searchable_dropdown_component.rb @@ -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