fix: solo vuelve a buscar el mismo filtro en caso de que se encuentre en un index
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Vicent Llopis 2022-11-22 09:22:06 +01:00
parent d4712e27c3
commit cac8879ec7
1 changed files with 5 additions and 5 deletions

View File

@ -102,7 +102,10 @@ export default class Searchbar extends Component {
filter = {};
}
this.doSearch(filter, 'state');
let stateParts = this.$state.current.name.split('.');
const isIndex = stateParts[1] == 'index';
this.doSearch(filter, isIndex ? 'index' : 'state');
}
openPanel(event) {
@ -198,10 +201,7 @@ export default class Searchbar extends Component {
}
doSearch(filter, source) {
const filterEquals = filter === this.filter;
if (filterEquals && (source != 'state')) return;
if (filterEquals && (source == 'state')) return;
if (filter === this.filter && source != 'index') return;
let promise = this.onSearch({$params: filter});
promise = promise || this.$q.resolve();
promise.then(data => this.onFilter(filter, source, data));