Commit 44d97d94 authored by Jacob Schatz's avatar Jacob Schatz

Get rid of hard coded new branch

parent cc958b4a
......@@ -30,7 +30,7 @@ GitLabDropdownInput = (function() {
}
})
.on('input', function(e) {
var val = e.currentTarget.value || 'new-branch';
var val = e.currentTarget.value || _this.options.inputFieldName;
val = val.split(' ').join('-') // replaces space with dash
.replace(/[^a-zA-Z0-9 -]/g, '').toLowerCase() // replace non alphanumeric
.replace(/(-)\1+/g, '-'); // replace repeated dashes
......
......@@ -85,6 +85,7 @@ import Cookies from 'js-cookie';
filterable: true,
filterRemote: true,
filterByText: true,
inputFieldName: $dropdown.data('input-field-name'),
fieldName: $dropdown.data('field-name'),
renderRow: function(ref) {
var li = refListItem.cloneNode(false);
......
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