File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 593593 } ,
594594
595595 hide : function ( ) {
596- var that = this ;
596+ var that = this ,
597+ container = $ ( that . suggestionsContainer ) ;
598+
599+ if ( $ . isFunction ( this . options . onHide ) && that . visible ) {
600+
601+ this . options . onHide . call ( that . element , container ) ;
602+ }
603+
597604 that . visible = false ;
598605 that . selectedIndex = - 1 ;
599606 $ ( that . suggestionsContainer ) . hide ( ) ;
602609
603610 suggest : function ( ) {
604611 if ( this . suggestions . length === 0 ) {
605- this . options . showNoSuggestionNotice ? this . noSuggestions ( ) : this . hide ( ) ;
612+ this . options . showNoSuggestionNotice ? this . noSuggestions ( ) : this . hide ( ) ;
606613 return ;
607614 }
608615
631638 html += '<div class="' + className + '" data-index="' + i + '">' + formatResult ( suggestion , value ) + '</div>' ;
632639 } ) ;
633640
634- this . adjustContainerWidth ( ) ;
641+ this . adjustContainerWidth ( ) ;
635642
636643 noSuggestionsContainer . detach ( ) ;
637644 container . html ( html ) ;
You can’t perform that action at this time.
0 commit comments