diff options
Diffstat (limited to 'app/assets/javascripts/issuable_form.js')
-rw-r--r-- | app/assets/javascripts/issuable_form.js | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/assets/javascripts/issuable_form.js b/app/assets/javascripts/issuable_form.js index 1b06dffbae7..153123a005f 100644 --- a/app/assets/javascripts/issuable_form.js +++ b/app/assets/javascripts/issuable_form.js @@ -5,6 +5,7 @@ import Autosave from './autosave'; import AutoWidthDropdownSelect from './issuable/auto_width_dropdown_select'; import { loadCSSFile } from './lib/utils/css_utils'; import { parsePikadayDate, pikadayToString } from './lib/utils/datetime_utility'; +import { select2AxiosTransport } from './lib/utils/select2_utils'; import { queryToObject, objectToQuery } from './lib/utils/url_utility'; import UsersSelect from './users_select'; import ZenMode from './zen_mode'; @@ -199,15 +200,16 @@ export default class IssuableForm { search, }; }, - results(data) { + results({ results }) { return { // `data` keys are translated so we can't just access them with a string based key - results: data[Object.keys(data)[0]].map((name) => ({ + results: results[Object.keys(results)[0]].map((name) => ({ id: name, text: name, })), }; }, + transport: select2AxiosTransport, }, initSelection(el, callback) { const val = el.val(); |