salix/front/core/components/searchbar/search-panel.js

19 lines
370 B
JavaScript

import Component from '../../lib/component';
export default class extends Component {
set filter(value) {
this.$.filter = value;
}
get filter() {
return this.$.filter;
}
onSearch() {
if (!this.onSubmit)
throw new Error('SearchPanel::onSubmit() method not defined');
this.onSubmit(this.filter);
}
}