Sha256: 222347b32d8c699e8749f76d6449b30930cd8d4678ff64370382bb453788863e
Contents?: true
Size: 530 Bytes
Versions: 9
Compression:
Stored size: 530 Bytes
Contents
export class Subject { constructor(element, url) { this.url = url element.autocomplete(this.options()); } options() { return { minLength: 2, source: ( request, response ) => { $.getJSON(this.url, { q: request.term }, response ); }, focus: function() { // prevent value inserted on focus return false; }, complete: function(event) { $('.ui-autocomplete-loading').removeClass("ui-autocomplete-loading"); } }; } }
Version data entries
9 entries across 9 versions & 2 rubygems