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

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>
<!-- Формирование списка ------------------------------------------------------------------------>
<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">
@@ -233,9 +233,13 @@ const componentOptions = {
this.updateSearchFromRouteQuery(this.$route);
},
list: {
handler() {
this.updatePageCount();
handler(newValue) {
this.updateGenreTreeIfNeeded();
if (this.prevList.totalFound != newValue.totalFound)
this.updatePageCount();
this.prevList = _.cloneDeep(newValue);
},
deep: true,
},
@@ -278,6 +282,7 @@ class Search {
limit = 20;
//stuff
prevList = {};
list = {
queryFound: -1,
totalFound: 0,