Skip to content
Snippets Groups Projects
Commit 44d97d94 authored by Jacob Schatz's avatar Jacob Schatz
Browse files

Get rid of hard coded new branch

parent cc958b4a
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
Loading
Loading
@@ -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);
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment