20 lines
416 B
JavaScript
20 lines
416 B
JavaScript
import Component from '../../lib/component';
|
|
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});
|
|
}
|
|
}
|