PHP Classes

File: vendors/select2/src/js/select2/data/maximumInputLength.js

Recommend this page to a friend!
  Classes of Jorge Castro   Gentelella BladeOne   vendors/select2/src/js/select2/data/maximumInputLength.js   Download  
File: vendors/select2/src/js/select2/data/maximumInputLength.js
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Gentelella BladeOne
Render templates using Bootstrap for presentation
Author: By
Last change:
Date: 3 years ago
Size: 720 bytes
 

Contents

Class file image Download
define([ ], function () { function MaximumInputLength (decorated, $e, options) { this.maximumInputLength = options.get('maximumInputLength'); decorated.call(this, $e, options); } MaximumInputLength.prototype.query = function (decorated, params, callback) { params.term = params.term || ''; if (this.maximumInputLength > 0 && params.term.length > this.maximumInputLength) { this.trigger('results:message', { message: 'inputTooLong', args: { maximum: this.maximumInputLength, input: params.term, params: params } }); return; } decorated.call(this, params, callback); }; return MaximumInputLength; });