Trigger change even in select2 test helper to produce production-like behaviour
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
bedbb7b744
commit
80ea344e42
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue