Skip to content

Commit

Permalink
Merge branch 'next' of github.com:appbaseio/reactivesearch into next
Browse files Browse the repository at this point in the history
  • Loading branch information
bietkul committed Jul 8, 2020
2 parents a9b1542 + 2a426d1 commit abbfd05
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/vue/src/components/result/ReactiveList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ const ReactiveList = {
pagination: VueTypes.bool.def(false),
paginationAt: types.paginationAt.def('bottom'),
react: types.react,
scrollOnChange: VueTypes.bool.def(true),
showResultStats: VueTypes.bool.def(true),
showEndPage: VueTypes.bool.def(false),
size: VueTypes.number.def(10),
Expand Down Expand Up @@ -265,7 +266,9 @@ const ReactiveList = {
if (this.hasPageChangeListener) {
this.$emit('pageChange', this.currentPageState + 1, this.totalPages);
} else {
window.scrollTo(0, 0);
if (this.scrollOnChange) {
window.scrollTo(0, 0);
}
}
this.isLoading = false;
}
Expand All @@ -275,7 +278,9 @@ const ReactiveList = {

if (newVal.length < oldVal.length) {
// query has changed
window.scrollTo(0, 0);
if (this.scrollOnChange) {
window.scrollTo(0, 0);
}
this.from = 0;
}
}
Expand Down

0 comments on commit abbfd05

Please sign in to comment.