Fixed broken pagination on favorites
This commit is contained in:
parent
3f837189ac
commit
b687e6886c
|
@ -92,18 +92,12 @@ export default {
|
||||||
Pagination
|
Pagination
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
let defaultOrdering = this.getOrderingFromString(
|
|
||||||
this.defaultOrdering || "-creation_date"
|
|
||||||
)
|
|
||||||
return {
|
return {
|
||||||
results: null,
|
results: null,
|
||||||
isLoading: false,
|
isLoading: false,
|
||||||
nextLink: null,
|
nextLink: null,
|
||||||
previousLink: null,
|
previousLink: null,
|
||||||
page: parseInt(this.defaultPage),
|
page: parseInt(this.defaultPage),
|
||||||
paginateBy: parseInt(this.defaultPaginateBy || 25),
|
|
||||||
orderingDirection: defaultOrdering.direction || "+",
|
|
||||||
ordering: defaultOrdering.field,
|
|
||||||
orderingOptions: [
|
orderingOptions: [
|
||||||
["creation_date", "creation_date"],
|
["creation_date", "creation_date"],
|
||||||
["title", "track_title"],
|
["title", "track_title"],
|
||||||
|
@ -117,6 +111,7 @@ export default {
|
||||||
this.$router.push({name: 'login', query: {next: this.$router.currentRoute.fullPath}})
|
this.$router.push({name: 'login', query: {next: this.$router.currentRoute.fullPath}})
|
||||||
}
|
}
|
||||||
this.fetchFavorites(FAVORITES_URL)
|
this.fetchFavorites(FAVORITES_URL)
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
$(".ui.dropdown").dropdown()
|
$(".ui.dropdown").dropdown()
|
||||||
|
@ -140,6 +135,7 @@ export default {
|
||||||
ordering: this.getOrderingAsString()
|
ordering: this.getOrderingAsString()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
this.fetchFavorites(FAVORITES_URL)
|
||||||
},
|
},
|
||||||
fetchFavorites(url) {
|
fetchFavorites(url) {
|
||||||
var self = this
|
var self = this
|
||||||
|
|
|
@ -87,6 +87,11 @@ export default {
|
||||||
orderingDirection: "-",
|
orderingDirection: "-",
|
||||||
ordering: "creation_date",
|
ordering: "creation_date",
|
||||||
},
|
},
|
||||||
|
"favorites": {
|
||||||
|
paginateBy: 50,
|
||||||
|
orderingDirection: "-",
|
||||||
|
ordering: "creation_date",
|
||||||
|
},
|
||||||
},
|
},
|
||||||
serviceWorker: {
|
serviceWorker: {
|
||||||
refreshing: false,
|
refreshing: false,
|
||||||
|
|
Loading…
Reference in New Issue