Fix filters modal [SCI-10656]

This commit is contained in:
Anton 2024-04-29 15:26:08 +02:00
parent b0334e52b7
commit c5d7353d68
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;