mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-05 04:53:01 +00:00
fix loadmore counter not resetting
- store load more counter in search store
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
v-for="artist in search.artists.value"
|
||||
:key="artist.image"
|
||||
:artist="artist"
|
||||
:alt="true"
|
||||
/>
|
||||
</div>
|
||||
<LoadMore v-if="search.artists.more" @loadMore="loadMore" />
|
||||
@@ -17,11 +18,9 @@ import LoadMore from "./LoadMore.vue";
|
||||
import useSearchStore from "../../../stores/search";
|
||||
const search = useSearchStore();
|
||||
|
||||
let counter = 0;
|
||||
|
||||
function loadMore() {
|
||||
counter += 6;
|
||||
search.loadArtists(counter);
|
||||
search.updateLoadCounter("artists", 6);
|
||||
search.loadArtists(search.loadCounter.artists);
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -31,7 +30,6 @@ function loadMore() {
|
||||
padding: $small;
|
||||
margin-bottom: $small;
|
||||
|
||||
|
||||
.xartist {
|
||||
background-color: $gray;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user