Skip to content

Commit

Permalink
fix(webui): clear selection after action performed
Browse files Browse the repository at this point in the history
closes gotson#303
  • Loading branch information
gotson committed Sep 1, 2020
1 parent 432dc91 commit e0cff70
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 4 deletions.
3 changes: 1 addition & 2 deletions komga-webui/src/views/BrowseCollection.vue
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,6 @@ export default Vue.extend({
updateRouteAndReload () {
this.unsetWatches()
this.selectedSeries = []
this.updateRoute()
this.loadSeries(this.collectionId)
Expand All @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion komga-webui/src/views/BrowseLibraries.vue
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,6 @@ export default Vue.extend({
updateRouteAndReload () {
this.unsetWatches()
this.selectedSeries = []
this.page = 1
this.updateRoute()
Expand Down Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions komga-webui/src/views/BrowseReadList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion komga-webui/src/views/BrowseSeries.vue
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,6 @@ export default Vue.extend({
updateRouteAndReload () {
this.unsetWatches()
this.selectedBooks = []
this.page = 1
this.updateRoute()
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions komga-webui/src/views/Dashboard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,8 @@ export default Vue.extend({
}
},
loadAll () {
this.selectedSeries = []
this.selectedBooks = []
this.loadNewSeries()
this.loadUpdatedSeries()
this.loadLatestBooks()
Expand Down
2 changes: 2 additions & 0 deletions komga-webui/src/views/Search.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e0cff70

Please sign in to comment.