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
This commit is contained in:
commit
dd627072b3
|
@ -12,6 +12,7 @@ export default class CreateItemDropdown {
|
||||||
this.fieldName = options.fieldName;
|
this.fieldName = options.fieldName;
|
||||||
this.onSelect = options.onSelect || (() => {});
|
this.onSelect = options.onSelect || (() => {});
|
||||||
this.getDataOption = options.getData;
|
this.getDataOption = options.getData;
|
||||||
|
this.getDataRemote = !!options.filterRemote;
|
||||||
this.createNewItemFromValueOption = options.createNewItemFromValue;
|
this.createNewItemFromValueOption = options.createNewItemFromValue;
|
||||||
this.$dropdown = options.$dropdown;
|
this.$dropdown = options.$dropdown;
|
||||||
this.$dropdownContainer = this.$dropdown.parent();
|
this.$dropdownContainer = this.$dropdown.parent();
|
||||||
|
@ -29,7 +30,7 @@ export default class CreateItemDropdown {
|
||||||
this.$dropdown.glDropdown({
|
this.$dropdown.glDropdown({
|
||||||
data: this.getData.bind(this),
|
data: this.getData.bind(this),
|
||||||
filterable: true,
|
filterable: true,
|
||||||
remote: false,
|
filterRemote: this.getDataRemote,
|
||||||
search: {
|
search: {
|
||||||
fields: ['text'],
|
fields: ['text'],
|
||||||
},
|
},
|
||||||
|
|
|
@ -116,7 +116,8 @@ export default {
|
||||||
this.model &&
|
this.model &&
|
||||||
this.hasLastDeploymentKey &&
|
this.hasLastDeploymentKey &&
|
||||||
this.model.last_deployment &&
|
this.model.last_deployment &&
|
||||||
this.model.last_deployment.deployable
|
this.model.last_deployment.deployable &&
|
||||||
|
this.model.last_deployment.deployable.retry_path
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue