really use autocompleteDocuments for collections

This commit is contained in:
j 2020-05-16 10:51:37 +02:00
parent d2eeadf860
commit 30f025f13f
2 changed files with 2 additions and 6 deletions

View file

@ -72,7 +72,7 @@ pandora.ui.documentFilterForm = function(options) {
}); });
function autocompleteFunction(key) { function autocompleteFunction(key) {
return key.autocomplete ? function(value, callback) { return key.autocomplete ? function(value, callback) {
pandora.api.autocomplete({ pandora.api.autocompleteDocuments({
key: key.id, key: key.id,
query: { query: {
conditions: [], conditions: [],

View file

@ -73,11 +73,7 @@ pandora.ui.filterForm = function(options) {
}); });
function autocompleteFunction(key) { function autocompleteFunction(key) {
return key.autocomplete ? function(value, callback) { return key.autocomplete ? function(value, callback) {
pandora.api[ pandora.api.autocomplete({
pandora.user.ui.section == 'documents'
? 'autocompleteDocuments'
: 'autocomplete'
]({
key: key.id, key: key.id,
query: { query: {
conditions: [], conditions: [],