Commit 80ea344e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent bedbb7b7
......@@ -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
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment