Commit dd627072 authored by Fatih Acet's avatar Fatih Acet 🙌

Merge branch 'mg-backport-create-item-dropdown-changes' into 'master'

Update CreateItemDropdown class to allow the glDropdown filterRemote option

See merge request gitlab-org/gitlab-ce!21041
parents ac1d83c5 a8c9cd41
......@@ -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'],
},
......
......@@ -116,7 +116,8 @@ export default {
this.model &&
this.hasLastDeploymentKey &&
this.model.last_deployment &&
this.model.last_deployment.deployable
this.model.last_deployment.deployable &&
this.model.last_deployment.deployable.retry_path
);
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment