Небольшие улучшения

This commit is contained in:
Book Pauk
2022-10-24 17:02:44 +07:00
parent bc2a54c4ab
commit b707f8425e

View File

@@ -111,7 +111,7 @@
</div> </div>
<!-- Формирование списка ------------------------------------------------------------------------> <!-- Формирование списка ------------------------------------------------------------------------>
<AuthorList v-model:list="list" :search="search" :genre-map="genreMap" :liberama-ready="liberamaReady" @list-event="listEvent" /> <AuthorList :list="list" :search="search" :genre-map="genreMap" :liberama-ready="liberamaReady" @list-event="listEvent" />
<!-- Формирование списка конец ------------------------------------------------------------------> <!-- Формирование списка конец ------------------------------------------------------------------>
<div class="row justify-center"> <div class="row justify-center">
@@ -233,9 +233,13 @@ const componentOptions = {
this.updateSearchFromRouteQuery(this.$route); this.updateSearchFromRouteQuery(this.$route);
}, },
list: { list: {
handler() { handler(newValue) {
this.updatePageCount();
this.updateGenreTreeIfNeeded(); this.updateGenreTreeIfNeeded();
if (this.prevList.totalFound != newValue.totalFound)
this.updatePageCount();
this.prevList = _.cloneDeep(newValue);
}, },
deep: true, deep: true,
}, },
@@ -278,6 +282,7 @@ class Search {
limit = 20; limit = 20;
//stuff //stuff
prevList = {};
list = { list = {
queryFound: -1, queryFound: -1,
totalFound: 0, totalFound: 0,