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

20 lines
416 B
JavaScript
Raw Normal View History

import Component from '../../lib/component';
2021-01-11 13:54:24 +00:00
import './style.scss';
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});
}
}