2018-06-07 21:47:19 +00:00
|
|
|
import Component from '../../lib/component';
|
|
|
|
|
2019-10-28 16:31:33 +00:00
|
|
|
export default class SearchPanel extends Component {
|
2018-06-07 21:47:19 +00:00
|
|
|
set filter(value) {
|
|
|
|
this.$.filter = value;
|
|
|
|
}
|
|
|
|
|
|
|
|
get filter() {
|
|
|
|
return this.$.filter;
|
|
|
|
}
|
|
|
|
|
|
|
|
onSearch() {
|
|
|
|
if (!this.onSubmit)
|
|
|
|
throw new Error('SearchPanel::onSubmit() method not defined');
|
|
|
|
|
2019-10-28 16:31:33 +00:00
|
|
|
this.onSubmit({$filter: this.filter});
|
2018-06-07 21:47:19 +00:00
|
|
|
}
|
|
|
|
}
|