diff --git a/chrome/content/zotero/bindings/itembox.xml b/chrome/content/zotero/bindings/itembox.xml
index 9c08a8b8a6..4c2efd1102 100644
--- a/chrome/content/zotero/bindings/itembox.xml
+++ b/chrome/content/zotero/bindings/itembox.xml
@@ -1615,25 +1615,23 @@
x.val),
- Object.values(results).map(x => x.comment),
+ Object.values(results).map(x => x.id),
false
);
}
@@ -251,36 +251,36 @@ ZoteroAutoComplete.prototype.startSearch = Zotero.Promise.coroutine(function* (s
});
-ZoteroAutoComplete.prototype.updateResult = function (result, comment) {
- Zotero.debug("Appending autocomplete value '" + result + "'" + (comment ? " (" + comment + ")" : ""));
+ZoteroAutoComplete.prototype.updateResult = function (value, id) {
+ Zotero.debug(`Appending autocomplete value '${value}'` + (id ? " (" + id + ")" : ''));
// Add to nsIAutoCompleteResult
- this._result.appendMatch(result, comment ? comment : null);
+ this._result.appendMatch(value, value, null, null, null, id);
// Add to our own list
- this._results.push(result);
+ this._results.push(value);
// Only update the UI every 10 records
if (this._result.matchCount % 10 == 0) {
this._result.setSearchResult(Ci.nsIAutoCompleteResult.RESULT_SUCCESS_ONGOING);
- this._listener.onUpdateSearchResult(this, this._result);
+ this._listener.onSearchResult(this, this._result);
}
}
-ZoteroAutoComplete.prototype.updateResults = function (results, comments, ongoing, resultCode) {
- if (!results) {
- results = [];
+ZoteroAutoComplete.prototype.updateResults = function (values, ids, ongoing, resultCode) {
+ if (!values) {
+ values = [];
}
- if (!comments) {
- comments = [];
+ if (!ids) {
+ ids = [];
}
- for (var i=0; i