Fixed sort where loadMore never got past 10
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div ref="resultSection">
|
<div ref="resultSection" class="resultSection">
|
||||||
<list-header v-bind="{ title, info, shortList }" :sticky="true" />
|
<list-header v-bind="{ title, info, shortList }" :sticky="true" />
|
||||||
|
|
||||||
<div
|
<div
|
||||||
@@ -121,8 +121,9 @@ export default {
|
|||||||
if (!front) this.results = this.results.concat(...results.results);
|
if (!front) this.results = this.results.concat(...results.results);
|
||||||
else this.results = results.results.concat(...this.results);
|
else this.results = results.results.concat(...this.results);
|
||||||
this.page = results.page;
|
this.page = results.page;
|
||||||
|
console.log("pushing page:", this.page);
|
||||||
this.loadedPages.push(this.page);
|
this.loadedPages.push(this.page);
|
||||||
this.loadedPages = this.loadedPages.sort();
|
this.loadedPages = this.loadedPages.sort((a, b) => a - b);
|
||||||
this.totalPages = results.total_pages;
|
this.totalPages = results.total_pages;
|
||||||
this.totalResults = results.total_results;
|
this.totalResults = results.total_results;
|
||||||
})
|
})
|
||||||
@@ -167,6 +168,10 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@import "src/scss/media-queries";
|
@import "src/scss/media-queries";
|
||||||
|
|
||||||
|
.resultSection {
|
||||||
|
background-color: var(--background-color);
|
||||||
|
}
|
||||||
|
|
||||||
.load-button {
|
.load-button {
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user