Merge pull request #7517 from aignatov-bio/ai-sci-10656-filters-fix

Fix filters modal [SCI-10656]
This commit is contained in:
ajugo 2024-04-29 16:01:18 +02:00 committed by GitHub
commit be25a9a36a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 8 deletions

View file

@ -21,7 +21,7 @@
:filters="filters"
:currentTeam="currentTeam"
@search="(newFilters) => { this.$emit('search', newFilters); }"
@close="close" />
@cancel="close" />
</div>
</div>
</form>

View file

@ -36,6 +36,9 @@ export default {
};
},
watch: {
filters() {
this.reloadData();
},
selected() {
if (this.selected) {
if (!this.fullDataLoaded) {
@ -46,13 +49,7 @@ export default {
}
},
query() {
if (this.query.length > 1) {
this.results = [];
this.page = 1;
this.total = 0;
this.fullDataLoaded = false;
this.loadData();
}
this.reloadData();
}
},
mounted() {
@ -105,6 +102,15 @@ export default {
this.page = 1;
this.loadData();
},
reloadData() {
if (this.query.length > 1) {
this.results = [];
this.page = 1;
this.total = 0;
this.fullDataLoaded = false;
this.loadData();
}
},
loadData() {
if (this.query.length < 2) return;