Is there any way to know when a lookup starts?
There are 2 reasons for this, one is to let the user know a lookup is running for long lookups, the other is to unbind on change events so that values populated by a lookup do not trigger executions meant for values changed by a human.
I tried monitoring the trigger field for changes, but the lookup system halts all event calls for trigger fields, pushing them out until after lookups complete, causing the lookup to run before I even know the trigger field had been changed.
Example:
$('.trigger input').on('change', function() { console.log('Trigger field just changed, lookup is going to run'); }); $(document).on("lookupcomplete", function (event) { console.log('Lookup Complete'); });
Expected Output:
Trigger field just changed, lookup is going to run
Lookup Complete
Actual Output:
Lookup Complete
Trigger field just changed, lookup is going to run