2

How does one change the delay time in Grappelli autocomplete fields? I have a specific data entry task and the second+ lag I have to wait for results is really annoying.

I've tried changing delay: 1000 to delay: 0 in jquery.grp_autocomplete_fk.js as follows, but it doesn't seem to improve performance:

var lookup_autocomplete = function(elem, options) {
    options.wrapper_autocomplete.find("input:first")
        .bind("focus", function() {
            options.wrapper_autocomplete.addClass("grp-state-focus");
        })
        .bind("blur", function() {
            options.wrapper_autocomplete.removeClass("grp-state-focus");
        })
        .autocomplete({
            minLength: 1,
            autoFocus: true,
            delay: 0,
            source: function(request, response) {                    
                $.ajax({
...

I profiled the actual database request and see it only takes a few milliseconds. I've been Googling around all day and haven't hit on a solution.

Any help much appreciated!

0 Answers0