Commit 9afa9b8d authored by Filipa Lacerda's avatar Filipa Lacerda

Enable eslint

parent 1c978aff
/* eslint-disable func-names,wrap-iife, no-shadow, no-unused-vars, one-var */
export default function issueStatusSelect() { export default function issueStatusSelect() {
$('.js-issue-status').each(function (i, el) { $('.js-issue-status').each((i, el) => {
const fieldName = $(el).data('field-name'); const fieldName = $(el).data('field-name');
return $(el).glDropdown({ return $(el).glDropdown({
selectable: true, selectable: true,
fieldName, fieldName,
toggleLabel: (function (_this) { toggleLabel(selected, element, instance) {
return function (selected, el, instance) {
let label = 'Author'; let label = 'Author';
const $item = instance.dropdown.find('.is-active'); const $item = instance.dropdown.find('.is-active');
if ($item.length) { if ($item.length) {
label = $item.text(); label = $item.text();
} }
return label; return label;
}; },
})(this),
clicked(options) { clicked(options) {
return options.e.preventDefault(); return options.e.preventDefault();
}, },
id(obj, el) { id(obj, element) {
return $(el).data('id'); return $(element).data('id');
}, },
}); });
}); });
......
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