fix: merge filter
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
37b312564e
commit
89141419c1
|
@ -26,6 +26,7 @@ export default class Searchbar extends Component {
|
||||||
this.autoState = true;
|
this.autoState = true;
|
||||||
this.separateIndex = true;
|
this.separateIndex = true;
|
||||||
this.entityState = 'card.summary';
|
this.entityState = 'card.summary';
|
||||||
|
this.isIndex = false;
|
||||||
|
|
||||||
this.deregisterCallback = this.$transitions.onSuccess(
|
this.deregisterCallback = this.$transitions.onSuccess(
|
||||||
{}, transition => this.onStateChange(transition));
|
{}, transition => this.onStateChange(transition));
|
||||||
|
@ -103,9 +104,9 @@ export default class Searchbar extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
let stateParts = this.$state.current.name.split('.');
|
let stateParts = this.$state.current.name.split('.');
|
||||||
const isIndex = stateParts[1] == 'index';
|
this.isIndex = stateParts[1] == 'index';
|
||||||
|
|
||||||
this.doSearch(filter, isIndex ? 'index' : 'state');
|
this.doSearch(filter, 'state');
|
||||||
}
|
}
|
||||||
|
|
||||||
openPanel(event) {
|
openPanel(event) {
|
||||||
|
@ -201,7 +202,7 @@ export default class Searchbar extends Component {
|
||||||
}
|
}
|
||||||
|
|
||||||
doSearch(filter, source) {
|
doSearch(filter, source) {
|
||||||
if (filter === this.filter && source != 'index') return;
|
if (filter === this.filter && !this.isIndex) return;
|
||||||
let promise = this.onSearch({$params: filter});
|
let promise = this.onSearch({$params: filter});
|
||||||
promise = promise || this.$q.resolve();
|
promise = promise || this.$q.resolve();
|
||||||
promise.then(data => this.onFilter(filter, source, data));
|
promise.then(data => this.onFilter(filter, source, data));
|
||||||
|
|
Loading…
Reference in New Issue