Fx60: Update DB query onRow() behavior
onRow() handlers now get passed a cancellation function as a second argument
This commit is contained in:
parent
564e72196f
commit
b08bd6849e
3 changed files with 12 additions and 18 deletions
|
@ -214,10 +214,11 @@ ZoteroAutoComplete.prototype.startSearch = Zotero.Promise.coroutine(function* (s
|
|||
var onRow = null;
|
||||
// If there's a result callback (e.g., for sorting), don't use a row handler
|
||||
if (!resultsCallback) {
|
||||
onRow = function (row) {
|
||||
onRow = function (row, cancel) {
|
||||
if (this._cancelled) {
|
||||
Zotero.debug("Cancelling query");
|
||||
throw StopIteration;
|
||||
cancel();
|
||||
return;
|
||||
}
|
||||
var result = row.getResultByIndex(0);
|
||||
var comment = row.getResultByIndex(1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue