Fixes #4041 - Tree select widget closes unexpectedly.

This commit is contained in:
Rolf Schmidt 2022-04-21 12:55:41 +02:00
parent 07dd0e8c5a
commit 57f6b8ce6c

View file

@ -160,6 +160,8 @@ class App.SearchableSelect extends Spine.Controller
if !@input.val() && !@attribute.multiple if !@input.val() && !@attribute.multiple
@updateAttributeValueName() @updateAttributeValueName()
@input.val(@attribute.valueName) @input.val(@attribute.valueName)
@input.trigger('change')
@shadowInput.trigger('change')
onKeyUp: => onKeyUp: =>
return if @input.val().trim() isnt '' || @attribute.multiple return if @input.val().trim() isnt '' || @attribute.multiple
@ -278,9 +280,7 @@ class App.SearchableSelect extends Spine.Controller
@addValueToShadowInput(currentText, dataId) @addValueToShadowInput(currentText, dataId)
else else
@input.val currentText @input.val currentText
@input.trigger('change')
@shadowInput.val dataId @shadowInput.val dataId
@shadowInput.trigger('change')
navigateIn: (event) -> navigateIn: (event) ->
event.stopPropagation() event.stopPropagation()