File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1500,20 +1500,24 @@ the specific language governing permissions and limitations under the Apache Lic
15001500 } ,
15011501
15021502 /**
1503+ * @return {Boolean } Whether or not search value was changed.
15031504 * @private
15041505 */
15051506 prefillNextSearchTerm : function ( ) {
15061507 // initializes search's value with nextSearchTerm (if defined by user)
15071508 // ignore nextSearchTerm if the dropdown is opened by the user pressing a letter
15081509 if ( this . search . val ( ) !== "" ) {
1509- return ;
1510+ return false ;
15101511 }
15111512
15121513 var nextSearchTerm = this . opts . nextSearchTerm ( this . data ( ) , this . lastSearchTerm ) ;
1513- if ( nextSearchTerm != undefined ) {
1514+ if ( nextSearchTerm !== undefined ) {
15141515 this . search . val ( nextSearchTerm ) ;
15151516 this . search . select ( ) ;
1517+ return true ;
15161518 }
1519+
1520+ return false ;
15171521 } ,
15181522
15191523 //abstract
@@ -3013,8 +3017,9 @@ the specific language governing permissions and limitations under the Apache Lic
30133017 this . updateResults ( true ) ;
30143018 } else {
30153019 // initializes search's value with nextSearchTerm and update search result
3016- this . prefillNextSearchTerm ( ) ;
3017- this . updateResults ( ) ;
3020+ if ( this . prefillNextSearchTerm ( ) ) {
3021+ this . updateResults ( ) ;
3022+ }
30183023 }
30193024 this . positionDropdown ( ) ;
30203025 } else {
You can’t perform that action at this time.
0 commit comments