From f345f9f47cef3be14997fa92b32bf3d2a2fc40d6 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Mon, 22 Jun 2015 16:30:27 +0200 Subject: [PATCH] Added change event trigger. --- .../javascripts/app/lib/app_post/searchable_select.js.coffee | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/assets/javascripts/app/lib/app_post/searchable_select.js.coffee b/app/assets/javascripts/app/lib/app_post/searchable_select.js.coffee index de10d3130..7cc58e9d6 100644 --- a/app/assets/javascripts/app/lib/app_post/searchable_select.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/searchable_select.js.coffee @@ -77,7 +77,9 @@ class App.SearchableSelect extends Spine.Controller selectItem: (event) -> @input.val event.currentTarget.textContent.trim() + @input.trigger('change') @shadowInput.val event.currentTarget.getAttribute('data-value') + @shadowInput.trigger('change') onTab: (event) -> return if not @isOpen @@ -93,7 +95,9 @@ class App.SearchableSelect extends Spine.Controller event.preventDefault() @input.val @values.filter('.is-active').text().trim() + @input.trigger('change') @shadowInput.val @values.filter('.is-active').attr('data-value') + @shadowInput.trigger('change') @toggle() filterList: (event) =>