Commit ecc3ed3a authored by Agate's avatar Agate 💬

Merge branch 'broken-favorites' into 'develop'

Fixed broken pagination on favorites

See merge request !1046
parents 3f837189 b687e688
Pipeline #9821 canceled with stages
in 42 seconds
......@@ -92,18 +92,12 @@ export default {
Pagination
},
data() {
let defaultOrdering = this.getOrderingFromString(
this.defaultOrdering || "-creation_date"
)
return {
results: null,
isLoading: false,
nextLink: null,
previousLink: null,
page: parseInt(this.defaultPage),
paginateBy: parseInt(this.defaultPaginateBy || 25),
orderingDirection: defaultOrdering.direction || "+",
ordering: defaultOrdering.field,
orderingOptions: [
["creation_date", "creation_date"],
["title", "track_title"],
......@@ -117,6 +111,7 @@ export default {
this.$router.push({name: 'login', query: {next: this.$router.currentRoute.fullPath}})
}
this.fetchFavorites(FAVORITES_URL)
},
mounted() {
$(".ui.dropdown").dropdown()
......@@ -140,6 +135,7 @@ export default {
ordering: this.getOrderingAsString()
}
})
this.fetchFavorites(FAVORITES_URL)
},
fetchFavorites(url) {
var self = this
......
......@@ -87,6 +87,11 @@ export default {
orderingDirection: "-",
ordering: "creation_date",
},
"favorites": {
paginateBy: 50,
orderingDirection: "-",
ordering: "creation_date",
},
},
serviceWorker: {
refreshing: false,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment