提交 e1d86ec9 编写于 作者: A Alfredo Sumaran

Select first value by default

上级 3b228db1
......@@ -6,19 +6,28 @@ class ProtectedBranchCreate {
buildDropdowns() {
// Allowed to Merge dropdowns
const $allowedToMergeDropdown = this.$wrap.find('.js-allowed-to-merge');
const $allowedToPushDropdown = this.$wrap.find('.js-allowed-to-push');
new ProtectedBranchAccessDropdown({
$dropdown: this.$wrap.find('.js-allowed-to-merge'),
$dropdown: $allowedToMergeDropdown,
data: gon.merge_access_levels,
onSelect: this.onSelect.bind(this)
});
// Select default
$allowedToMergeDropdown.data('glDropdown').selectRowAtIndex(document.createEvent('Event'), 0);
// Allowed to Push dropdowns
new ProtectedBranchAccessDropdown({
$dropdown: this.$wrap.find('.js-allowed-to-push'),
$dropdown: $allowedToPushDropdown,
data: gon.push_access_levels,
onSelect: this.onSelect.bind(this)
});
// Select default
$allowedToPushDropdown.data('glDropdown').selectRowAtIndex(document.createEvent('Event'), 0);
new ProtectedBranchDropdowns({
$dropdowns: this.$wrap.find('.js-protected-branch-select'),
onSelect: this.onSelect.bind(this)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册