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 593
593
} ,
594
594
595
595
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
+
597
604
that . visible = false ;
598
605
that . selectedIndex = - 1 ;
599
606
$ ( that . suggestionsContainer ) . hide ( ) ;
602
609
603
610
suggest : function ( ) {
604
611
if ( this . suggestions . length === 0 ) {
605
- this . options . showNoSuggestionNotice ? this . noSuggestions ( ) : this . hide ( ) ;
612
+ this . options . showNoSuggestionNotice ? this . noSuggestions ( ) : this . hide ( ) ;
606
613
return ;
607
614
}
608
615
631
638
html += '<div class="' + className + '" data-index="' + i + '">' + formatResult ( suggestion , value ) + '</div>' ;
632
639
} ) ;
633
640
634
- this . adjustContainerWidth ( ) ;
641
+ this . adjustContainerWidth ( ) ;
635
642
636
643
noSuggestionsContainer . detach ( ) ;
637
644
container . html ( html ) ;
You can’t perform that action at this time.
0 commit comments