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

19 lines
393 B
JavaScript

import Component from '../../lib/component';
export default class SearchPanel 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({$filter: this.filter});
}
}