2 * Add autocomplete suggestions for names of registered users.
8 fetch: function ( userInput, response, maxRows ) {
9 const node = this[ 0 ];
11 api = api || new mw.Api();
13 $.data( node, 'request', api.get( {
19 } ).done( ( data ) => {
20 const users = data.query.allusers.map( ( userObj ) => userObj.name );
25 const node = this[ 0 ],
26 request = $.data( node, 'request' );
30 $.removeData( node, 'request' );
36 $( '.mw-autocomplete-user' ).suggestions( config );