Resolve MR review suggestions
This commit is contained in:
parent
7f4609198d
commit
01eb0571f0
|
@ -1,4 +1,3 @@
|
|||
/* eslint-disable */
|
||||
// This is a manifest file that'll be compiled into including all the files listed below.
|
||||
// Add new JavaScript code in separate files in this directory and they'll automatically
|
||||
// be included in the compiled file accessible from http://example.com/assets/application.js
|
||||
|
@ -6,8 +5,3 @@
|
|||
// the compiled file.
|
||||
//
|
||||
/*= require_tree . */
|
||||
|
||||
(function() {
|
||||
|
||||
}).call(this);
|
||||
|
|
@ -18,22 +18,22 @@
|
|||
param: 'name[]',
|
||||
}];
|
||||
|
||||
function clearSearch(event) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
function clearSearch(e) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
|
||||
document.querySelector('.filtered-search').value = '';
|
||||
document.querySelector('.clear-search').classList.add('hidden');
|
||||
}
|
||||
|
||||
function toggleClearSearchButton(event) {
|
||||
function toggleClearSearchButton(e) {
|
||||
const clearSearchButton = document.querySelector('.clear-search');
|
||||
|
||||
if (event.target.value) {
|
||||
clearSearchButton.classList.remove('hidden');
|
||||
} else {
|
||||
clearSearchButton.classList.add('hidden');
|
||||
}
|
||||
clearSearchButton.classList.remove('hidden');
|
||||
} else {
|
||||
clearSearchButton.classList.add('hidden');
|
||||
}
|
||||
}
|
||||
|
||||
function loadSearchParamsFromURL() {
|
||||
|
@ -97,16 +97,16 @@
|
|||
document.querySelector('.clear-search').addEventListener('click', clearSearch);
|
||||
}
|
||||
|
||||
processInput(event) {
|
||||
const input = event.target.value;
|
||||
processInput(e) {
|
||||
const input = e.target.value;
|
||||
this.tokenizer.processTokens(input);
|
||||
}
|
||||
|
||||
checkForEnter(event) {
|
||||
checkForEnter(e) {
|
||||
// Enter KeyCode
|
||||
if (event.keyCode === 13) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
if (e.keyCode === 13) {
|
||||
e.stopPropagation();
|
||||
e.preventDefault();
|
||||
this.search();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
|
||||
inputs.forEach((i) => {
|
||||
if (incompleteToken) {
|
||||
const prevToken = this.tokens[this.tokens.length - 1];
|
||||
const prevToken = this.tokens.last();
|
||||
prevToken.value += ` ${i}`;
|
||||
|
||||
// Remove last quotation
|
||||
|
|
Loading…
Reference in New Issue