Skip to content
Snippets Groups Projects
Commit 80ea344e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Trigger change even in select2 test helper to produce production-like behaviour

parent bedbb7b7
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -17,9 +17,9 @@ module Select2Helper
selector = options.fetch(:from)
 
if options[:multiple]
execute_script("$('#{selector}').select2('val', ['#{value}'], true);")
execute_script("$('#{selector}').select2('val', ['#{value}']).trigger('change');")
else
execute_script("$('#{selector}').select2('val', '#{value}', true);")
execute_script("$('#{selector}').select2('val', '#{value}').trigger('change');")
end
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment