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
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
d4712e27c3
commit
cac8879ec7
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue