*
* @constructor
* @param {Object} [config] Configuration options
- * @cfg {boolean} [pushPending=false] Visually mark the input field as "pending", while
- * requesting suggestions.
* @cfg {boolean} [performSearchOnClick=true] If true, the script will start a search when-
* ever a user hits a suggestion. If false, the text of the suggestion is inserted into the
* text field only.
config = $.extend( {
icon: 'search',
maxLength: undefined,
+ showPendingRequest: false,
performSearchOnClick: true,
dataLocation: 'header'
}, config );
this.$element.addClass( 'mw-widget-searchInputWidget' );
this.lookupMenu.$element.addClass( 'mw-widget-searchWidget-menu' );
this.lastLookupItems = [];
- if ( !config.pushPending ) {
- this.pushPending = false;
- }
if ( config.dataLocation ) {
this.dataLocation = config.dataLocation;
}
urls = data.data[ 3 ],
self = this;
- // eslint-disable-next-line jquery/no-each-util
+ // eslint-disable-next-line no-jquery/no-each-util
$.each( titles, function ( i, result ) {
items.push( new mw.widgets.TitleOptionWidget(
self.getOptionWidgetData(
mw.widgets.SearchInputWidget.parent.prototype.onLookupMenuItemChoose.apply( this, arguments );
if ( this.performSearchOnClick ) {
- this.$element.closest( 'form' ).submit();
+ this.$element.closest( 'form' ).trigger( 'submit' );
}
};