Reset table sort options

This commit is contained in:
Alex Ling 2022-03-19 11:23:23 +00:00
parent 95eb208901
commit 2cc1a06b4e

View File

@ -82,6 +82,7 @@ const component = () => {
searchChapters(query) { searchChapters(query) {
this.searching = true; this.searching = true;
this.allChapters = []; this.allChapters = [];
this.sortOptions = [];
this.chapters = undefined; this.chapters = undefined;
this.listManga = false; this.listManga = false;
fetch( fetch(
@ -356,6 +357,7 @@ const component = () => {
applyFilters() { applyFilters() {
this.appliedFilters = this.filterSettings; this.appliedFilters = this.filterSettings;
this.chapters = this.filteredChapters; this.chapters = this.filteredChapters;
this.sortOptions = [];
}, },
clearFilters() { clearFilters() {
$("#filter-form input") $("#filter-form input")
@ -364,6 +366,7 @@ const component = () => {
$("#filter-form select").val("all"); $("#filter-form select").val("all");
this.appliedFilters = []; this.appliedFilters = [];
this.chapters = this.filteredChapters; this.chapters = this.filteredChapters;
this.sortOptions = [];
}, },
mangaSelected(event) { mangaSelected(event) {
const mid = event.currentTarget.getAttribute("data-id"); const mid = event.currentTarget.getAttribute("data-id");