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

19 lines
370 B
JavaScript
Raw Normal View History

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);
}
}