Added change event trigger.
This commit is contained in:
parent
b38b70b440
commit
f345f9f47c
1 changed files with 4 additions and 0 deletions
|
@ -77,7 +77,9 @@ class App.SearchableSelect extends Spine.Controller
|
||||||
|
|
||||||
selectItem: (event) ->
|
selectItem: (event) ->
|
||||||
@input.val event.currentTarget.textContent.trim()
|
@input.val event.currentTarget.textContent.trim()
|
||||||
|
@input.trigger('change')
|
||||||
@shadowInput.val event.currentTarget.getAttribute('data-value')
|
@shadowInput.val event.currentTarget.getAttribute('data-value')
|
||||||
|
@shadowInput.trigger('change')
|
||||||
|
|
||||||
onTab: (event) ->
|
onTab: (event) ->
|
||||||
return if not @isOpen
|
return if not @isOpen
|
||||||
|
@ -93,7 +95,9 @@ class App.SearchableSelect extends Spine.Controller
|
||||||
event.preventDefault()
|
event.preventDefault()
|
||||||
|
|
||||||
@input.val @values.filter('.is-active').text().trim()
|
@input.val @values.filter('.is-active').text().trim()
|
||||||
|
@input.trigger('change')
|
||||||
@shadowInput.val @values.filter('.is-active').attr('data-value')
|
@shadowInput.val @values.filter('.is-active').attr('data-value')
|
||||||
|
@shadowInput.trigger('change')
|
||||||
@toggle()
|
@toggle()
|
||||||
|
|
||||||
filterList: (event) =>
|
filterList: (event) =>
|
||||||
|
|
Loading…
Reference in a new issue