fix(webui): clear selection after action performed

closes #303
This commit is contained in:
Gauthier Roebroeck 2020-09-01 11:37:41 +08:00
parent 432dc91562
commit e0cff70ff5
6 changed files with 10 additions and 4 deletions

View file

@ -259,8 +259,6 @@ export default Vue.extend({
updateRouteAndReload () {
this.unsetWatches()
this.selectedSeries = []
this.updateRoute()
this.loadSeries(this.collectionId)
@ -269,6 +267,7 @@ export default Vue.extend({
async loadSeries (collectionId: string) {
this.series = (await this.$komgaCollections.getSeries(collectionId, { unpaged: true } as PageRequest, this.filters.library, this.filters.status, this.filters.readStatus, this.filters.genre, this.filters.tag, this.filters.language, this.filters.publisher, this.filters.ageRating)).content
this.seriesCopy = [...this.series]
this.selectedSeries = []
},
async loadCollection (collectionId: string) {
this.collection = await this.$komgaCollections.getOneCollection(collectionId)

View file

@ -300,7 +300,6 @@ export default Vue.extend({
updateRouteAndReload () {
this.unsetWatches()
this.selectedSeries = []
this.page = 1
this.updateRoute()
@ -345,6 +344,8 @@ export default Vue.extend({
})
},
async loadPage (libraryId: string, page: number, sort: SortActive) {
this.selectedSeries = []
const pageRequest = {
page: page - 1,
size: this.pageSize,

View file

@ -157,6 +157,7 @@ export default Vue.extend({
this.readList = await this.$komgaReadLists.getOneReadList(readListId)
this.books = (await this.$komgaReadLists.getBooks(readListId, { unpaged: true } as PageRequest)).content
this.booksCopy = [...this.books]
this.selectedBooks = []
},
editSingleBook (book: BookDto) {
this.$store.dispatch('dialogUpdateBooks', book)

View file

@ -390,7 +390,6 @@ export default Vue.extend({
updateRouteAndReload () {
this.unsetWatches()
this.selectedBooks = []
this.page = 1
this.updateRoute()
@ -438,6 +437,8 @@ export default Vue.extend({
})
},
async loadPage (seriesId: string, page: number, sort: SortActive) {
this.selectedBooks = []
const pageRequest = {
page: page - 1,
size: this.pageSize,

View file

@ -176,6 +176,8 @@ export default Vue.extend({
}
},
loadAll () {
this.selectedSeries = []
this.selectedBooks = []
this.loadNewSeries()
this.loadUpdatedSeries()
this.loadLatestBooks()

View file

@ -257,6 +257,8 @@ export default Vue.extend({
this.loadResults(this.$route.query.q.toString())
},
async loadResults (search: string) {
this.selectedBooks = []
this.selectedSeries = []
if (search) {
this.loading = true