Skip to content

Commit 157ba04

Browse files
Gabriel Schulhofarschmitz
Gabriel Schulhof
authored andcommitted
Autocomplete: Implement _elementsFromFromClassKey()
1 parent 330dc7e commit 157ba04

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

ui/autocomplete.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,20 @@ $.widget( "ui.autocomplete", {
334334
this.liveRegion.remove();
335335
},
336336

337+
_elementsFromClassKey: function( classKey ) {
338+
switch ( classKey ) {
339+
case "ui-autocomplete":
340+
return this.menu.element;
341+
case "ui-autocomplete-loading":
342+
if ( !this.element.hasClass( "ui-autocomplete-loading" ) ) {
343+
return $();
344+
}
345+
break;
346+
default:
347+
return this._superApply( arguments );
348+
}
349+
},
350+
337351
_setOption: function( key, value ) {
338352
this._super( key, value );
339353
if ( key === "source" ) {

0 commit comments

Comments
 (0)