mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-03-05 20:23:16 +08:00
Fix filters modal [SCI-10656]
This commit is contained in:
parent
b0334e52b7
commit
c5d7353d68
2 changed files with 14 additions and 8 deletions
|
@ -21,7 +21,7 @@
|
|||
:filters="filters"
|
||||
:currentTeam="currentTeam"
|
||||
@search="(newFilters) => { this.$emit('search', newFilters); }"
|
||||
@close="close" />
|
||||
@cancel="close" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue