The tag autocompletion currently uses the old util API.
Changing the presets.json from:
"data-module-source": "/api/2/util/tag/autocomplete?incomplete=?"
to
"data-module-source": "/api/3/action/tag_autocomplete?query=?"
won't work because the former returns ResultSet[Result] and the latter returns result.
I see the parseCompletions code in ckan/public/base/javascript/client.js
var raw = jQuery.isArray(data) ? data : data.ResultSet && data.ResultSet.Result || {};
but when I change it to raw = data.result
it doesn't work. Any tips?
Using a workaround https://github.com/ckan/ckan/pull/5071 doesn't completely solve the problem, it would be good to have this implemented properly, if someone has some suggestions?
The tag autocompletion currently uses the old util API. Changing the presets.json from:
"data-module-source": "/api/2/util/tag/autocomplete?incomplete=?"
to"data-module-source": "/api/3/action/tag_autocomplete?query=?"
won't work because the former returnsResultSet[Result]
and the latter returnsresult
.I see the parseCompletions code in ckan/public/base/javascript/client.js
var raw = jQuery.isArray(data) ? data : data.ResultSet && data.ResultSet.Result || {};
but when I change it toraw = data.result
it doesn't work. Any tips?