X-Git-Url: http://source.bookstackapp.com/bookstack/blobdiff_plain/a6633642232efd164d4708967ab59e498fbff896..refs/pull/4317/head:/resources/js/components/entity-search.js diff --git a/resources/js/components/entity-search.js b/resources/js/components/entity-search.js index 8b1861ecf..7a5044470 100644 --- a/resources/js/components/entity-search.js +++ b/resources/js/components/entity-search.js @@ -1,10 +1,8 @@ -import {onSelect} from "../services/dom"; +import {onSelect} from '../services/dom'; +import {Component} from './component'; + +export class EntitySearch extends Component { -/** - * Class EntitySearch - * @extends {Component} - */ -class EntitySearch { setup() { this.entityId = this.$opts.entityId; this.entityType = this.$opts.entityType; @@ -33,7 +31,8 @@ class EntitySearch { runSearch() { const term = this.searchInput.value.trim(); if (term.length === 0) { - return this.clearSearch(); + this.clearSearch(); + return; } this.searchView.classList.remove('hidden'); @@ -54,6 +53,5 @@ class EntitySearch { this.loadingBlock.classList.add('hidden'); this.searchInput.value = ''; } -} -export default EntitySearch; \ No newline at end of file +}