File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -280,7 +280,8 @@ Ractive.components['dropdown'] = Ractive.extend do
280280 '_add' : (ctx ) ->
281281 c .button = ctx .component
282282 sleep 10 , -> dd .dropdown 'show'
283- err <~ @fire \add , c , @get \search -term
283+ newKey = @get \search -term
284+ err <~ @fire \add , c , newKey
284285 # dropdown should only be closed if there is
285286 # no error returned
286287 unless err
@@ -289,6 +290,10 @@ Ractive.components['dropdown'] = Ractive.extend do
289290 @set \search -term , ''
290291 # clear the dropdown search field
291292 $('.ui.dropdown' ).find(".search" ).val("" )
293+ <~ set -immediate
294+ dd .dropdown 'set selected' , newKey
295+ dd .dropdown 'refresh'
296+
292297 data : ->
293298 'search-fields' : <[ description ]>
294299 'search-term' : ''
@@ -313,5 +318,4 @@ Ractive.components['dropdown'] = Ractive.extend do
313318 'selected-key' : null
314319 'selected-name' : null
315320 'load-first' : 100
316-
317- 'listen-external' : yes # listen external key changes by default
321+ 'listen-external' : yes # listen external key changes by default
You can’t perform that action at this time.
0 commit comments