Commit 13b41465 authored by Inactive Account's avatar Inactive Account Committed by Phil Hughes

Remove IIFEs from project_find_file.js

parent d4fd6eb5
......@@ -55,26 +55,21 @@ export default class ProjectFindFile {
initEvent() {
this.inputElement.off('keyup');
this.inputElement.on(
'keyup',
(function(_this) {
return function(event) {
this.inputElement.on('keyup', event => {
const target = $(event.target);
const value = target.val();
const ref = target.data('oldValue');
const oldValue = ref != null ? ref : '';
if (value !== oldValue) {
target.data('oldValue', value);
_this.findFile();
return _this.element
this.findFile();
return this.element
.find('tr.tree-item')
.eq(0)
.addClass('selected')
.focus();
}
};
})(this),
);
});
}
findFile() {
......
---
title: refactor javascript to remove Immediately Invoked Function Expression from
project file search
merge_request: 19192
author: Brian Luckenbill
type: other
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