mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
reset applied filters on search
This commit is contained in:
@@ -342,6 +342,8 @@ export default {
|
||||
types: this.$route.params.types?.split('+') || []
|
||||
};
|
||||
|
||||
this.$refs.stvList.resetFilters();
|
||||
|
||||
// init into student list
|
||||
this.$refs.stvList.updateUrl(
|
||||
ApiStv.students.search(searchsettings, this.studiensemesterKurzbz)
|
||||
|
||||
@@ -359,6 +359,9 @@ export default {
|
||||
this.filter = filter;
|
||||
this.updateUrl();
|
||||
},
|
||||
resetFilters() {
|
||||
this.$refs['filtersList'].clearFilters();
|
||||
},
|
||||
updateUrl(endpoint, first) {
|
||||
this.lastSelected = first ? undefined : this.selected;
|
||||
|
||||
@@ -505,7 +508,7 @@ export default {
|
||||
<template #filter>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<list-filter @change="updateFilter" />
|
||||
<list-filter ref="filtersList" @change="updateFilter" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -74,6 +74,9 @@ export default {
|
||||
},
|
||||
remove(index) {
|
||||
this.filters.splice(index, 1);
|
||||
},
|
||||
clearFilters() {
|
||||
this.filters = [];
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
||||
Reference in New Issue
Block a user