-import {onSelect} from "../services/dom";
+import {onSelect} from '../services/dom.ts';
+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;
runSearch() {
const term = this.searchInput.value.trim();
if (term.length === 0) {
- return this.clearSearch();
+ this.clearSearch();
+ return;
}
this.searchView.classList.remove('hidden');
this.loadingBlock.classList.add('hidden');
this.searchInput.value = '';
}
-}
-export default EntitySearch;
\ No newline at end of file
+}