FIX: only send up to 100 selected tags in the tag search request to avoid sending a query string that's too long

This commit is contained in:
Neil Lalonde 2018-02-06 17:54:34 -05:00
parent b2b6dc68a6
commit ce26f48f97

View File

@ -109,12 +109,15 @@ export default Ember.TextField.extend({
url: Discourse.getURL("/tags/filter/search"),
dataType: 'json',
data: function (term) {
const selectedTags = self.get('tags');
const d = {
q: term,
limit: self.siteSettings.max_tag_search_results,
categoryId: self.get('categoryId'),
selected_tags: self.get('tags')
categoryId: self.get('categoryId')
};
if (selectedTags) {
d.selected_tags = selectedTags.slice(0,100);
}
if (!self.get('everyTag')) {
d.filterForInput = true;
}