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:
authorMike Greiling <mike@pixelcog.com>2018-08-07 01:21:39 +0300
committerFatih Acet <acetfatih@gmail.com>2018-08-07 01:21:39 +0300
commita8c9cd41d2f3dd4b1606aae94a551f35dfd6a708 (patch)
treec672d177e7dad767d5eecc7c750e6688f86af8ef /app/assets/javascripts/create_item_dropdown.js
parentac1d83c56b4aa550761a13f25d7650c94194553f (diff)
Update CreateItemDropdown class to allow the glDropdown filterRemote option
Diffstat (limited to 'app/assets/javascripts/create_item_dropdown.js')
-rw-r--r--app/assets/javascripts/create_item_dropdown.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/assets/javascripts/create_item_dropdown.js b/app/assets/javascripts/create_item_dropdown.js
index 42e9e568170..8ef9aa7f529 100644
--- a/app/assets/javascripts/create_item_dropdown.js
+++ b/app/assets/javascripts/create_item_dropdown.js
@@ -12,6 +12,7 @@ export default class CreateItemDropdown {
this.fieldName = options.fieldName;
this.onSelect = options.onSelect || (() => {});
this.getDataOption = options.getData;
+ this.getDataRemote = !!options.filterRemote;
this.createNewItemFromValueOption = options.createNewItemFromValue;
this.$dropdown = options.$dropdown;
this.$dropdownContainer = this.$dropdown.parent();
@@ -29,7 +30,7 @@ export default class CreateItemDropdown {
this.$dropdown.glDropdown({
data: this.getData.bind(this),
filterable: true,
- remote: false,
+ filterRemote: this.getDataRemote,
search: {
fields: ['text'],
},