X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/db791674691062c26e0073361ab731ed5c772713..refs/pull/5280/head:/resources/js/components/dropdown-search.js diff --git a/resources/js/components/dropdown-search.js b/resources/js/components/dropdown-search.js index 30a2aadc1..2344619f5 100644 --- a/resources/js/components/dropdown-search.js +++ b/resources/js/components/dropdown-search.js @@ -1,6 +1,6 @@ -import {debounce} from "../services/util"; -import {transitionHeight} from "../services/animations"; -import {Component} from "./component"; +import {debounce} from '../services/util'; +import {transitionHeight} from '../services/animations'; +import {Component} from './component'; export class DropdownSearch extends Component { @@ -40,7 +40,7 @@ export class DropdownSearch extends Component { runLocalSearch(searchTerm) { const listItems = this.listContainerElem.querySelectorAll(this.localSearchSelector); - for (let listItem of listItems) { + for (const listItem of listItems) { const match = !searchTerm || listItem.textContent.toLowerCase().includes(searchTerm); listItem.style.display = match ? 'flex' : 'none'; listItem.classList.toggle('hidden', !match); @@ -79,4 +79,4 @@ export class DropdownSearch extends Component { this.loadingElem.style.display = show ? 'block' : 'none'; } -} \ No newline at end of file +}