Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/lib/utils/select2_utils.js')
-rw-r--r--app/assets/javascripts/lib/utils/select2_utils.js25
1 files changed, 0 insertions, 25 deletions
diff --git a/app/assets/javascripts/lib/utils/select2_utils.js b/app/assets/javascripts/lib/utils/select2_utils.js
deleted file mode 100644
index 03c0e608b79..00000000000
--- a/app/assets/javascripts/lib/utils/select2_utils.js
+++ /dev/null
@@ -1,25 +0,0 @@
-import axios from './axios_utils';
-import { normalizeHeaders, parseIntPagination } from './common_utils';
-
-// This is used in the select2 config to replace jQuery.ajax with axios
-export const select2AxiosTransport = (params) => {
- axios({
- method: params.type?.toLowerCase() || 'get',
- url: params.url,
- params: params.data,
- })
- .then((res) => {
- const results = res.data || [];
- const headers = normalizeHeaders(res.headers);
- const pagination = parseIntPagination(headers);
- const more = pagination.nextPage > pagination.page;
-
- params.success({
- results,
- pagination: {
- more,
- },
- });
- })
- .catch(params.error);
-};