forked from DebaucheryLibrarian/traxxx
Fixed actors and movies pagination scroll.
This commit is contained in:
@@ -3,7 +3,10 @@
|
||||
<div class="content-inner">
|
||||
<SearchBar :placeholder="`Search ${totalCount} movies`" />
|
||||
|
||||
<div class="tiles">
|
||||
<div
|
||||
ref="tiles"
|
||||
class="tiles"
|
||||
>
|
||||
<MovieTile
|
||||
v-for="movie in movies"
|
||||
:key="`movie-${movie.id}`"
|
||||
@@ -42,6 +45,8 @@ async function fetchMovies() {
|
||||
|
||||
this.movies = movies;
|
||||
this.totalCount = totalCount;
|
||||
|
||||
this.$refs.tiles.scrollIntoView();
|
||||
}
|
||||
|
||||
async function searchMovies() {
|
||||
@@ -71,7 +76,7 @@ export default {
|
||||
return {
|
||||
movies: [],
|
||||
totalCount: 0,
|
||||
limit: 30,
|
||||
limit: 5,
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
@@ -99,14 +104,14 @@ export default {
|
||||
}
|
||||
|
||||
.search {
|
||||
margin: 1rem 0;
|
||||
margin: 1rem 0 0 0;
|
||||
}
|
||||
|
||||
.tiles {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
|
||||
grid-gap: 1rem;
|
||||
margin: 0 0 1rem 0;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
@media(max-width: $breakpoint-kilo) {
|
||||
|
||||
Reference in New Issue
Block a user