refs #5334 onsearch postlink
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Carlos Satorres 2023-07-03 09:38:36 +02:00
parent dc10c20fe3
commit 5e68363312
2 changed files with 4 additions and 8 deletions

View File

@ -4,6 +4,10 @@ import Section from 'salix/components/section';
class Controller extends Section {
$postLink() {
this.$.treeview.fetch();
if (this.$params.q) {
const search = JSON.parse(this.$params.q);
this.onSearch(search);
}
}
onSearch(params) {

View File

@ -4,14 +4,6 @@
limit="20"
order="id">
</vn-crud-model>
<vn-portal slot="topbar">
<vn-searchbar
vn-focus
info="Search departments by id, name or code"
on-search="$ctrl.onSearch($params)"
base-state="worker.department">
</vn-searchbar>
</vn-portal>
<ui-view>
<vn-worker-department-index></vn-worker-department-index>
</ui-view>