summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/basic/basic_controller.js
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2018-03-08 14:58:40 +0100
committerAaron Bohy <aab@odoo.com>2018-03-10 09:01:46 +0100
commit414b1ef7817cc24d348d59a65d7ce19d5af091c4 (patch)
treecd4112f906252da322b92cf2e98b5f1131cd1108 /addons/web/static/src/js/views/basic/basic_controller.js
parent4e204ed2233ccd36b2eb7d3e56bfa741b9cb3e14 (diff)
[FIX] web: scroll to top when using the pager
In multi pages list view, the scroll position is reset to top when the user switches between pages. This wasn't working if he first reset the limit, and then switched between pages.
Diffstat (limited to 'addons/web/static/src/js/views/basic/basic_controller.js')
-rw-r--r--addons/web/static/src/js/views/basic/basic_controller.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/addons/web/static/src/js/views/basic/basic_controller.js b/addons/web/static/src/js/views/basic/basic_controller.js
index 263412fd2a2..1a87c3433f6 100644
--- a/addons/web/static/src/js/views/basic/basic_controller.js
+++ b/addons/web/static/src/js/views/basic/basic_controller.js
@@ -139,6 +139,7 @@ var BasicController = AbstractController.extend(FieldManagerMixin, {
this.pager.on('pager_changed', this, function (newState) {
var self = this;
this.pager.disable();
+ data = this.model.get(this.handle, {raw: true});
var limitChanged = (data.limit !== newState.limit);
this.reload({limit: newState.limit, offset: newState.current_min - 1})
.then(function () {