Skip to content

Commit 6551352

Browse files
chiattjacobtylerwalls
authored andcommitted
Fetch single list instead of all lists, #10552
1 parent a0d283a commit 6551352

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

arches/app/media/js/viewmodels/reference-select.js

+2-3
Original file line numberDiff line numberDiff line change
@@ -67,20 +67,19 @@ define([
6767
placeholder: self.placeholder,
6868
allowClear: true,
6969
ajax: {
70-
url: arches.urls.controlled_lists,
70+
url: arches.urls.controlled_list(ko.unwrap(params.node.config.controlledList)),
7171
dataType: 'json',
7272
quietMillis: 250,
7373
data: function(requestParams) {
7474
let term = requestParams.term || '';
7575
let page = requestParams.page || 1;
7676
return {
77-
conceptid: ko.unwrap(params.node.config.controlledList),
7877
query: term,
7978
page: page
8079
};
8180
},
8281
processResults: function(data) {
83-
const items = data.controlled_lists.find(list => list.id === params.node.config.controlledList()).items;
82+
const items = data.items;
8483
const flatItems = self.flattenItems(items, [], []);
8584
flatItems.forEach(item => {
8685
item["listid"] = item.id;

0 commit comments

Comments
 (0)