mirror of
https://github.com/ansible/awx.git
synced 2026-01-16 20:30:46 -03:30
UI - scroll to top in pagination
Currently in pagination, when we switch from one page to another, the view is stuck at the bottom and is slightly inconvenient to scroll all the way to top, in potentially a large list of records. So in order to prevent that, this commit sets automatic scroll to top while switching between pages, using jQuery's animate and scrollTop methods. Signed-off-by: Vismay Golwala <vgolwala@redhat.com>
This commit is contained in:
parent
658bdddac3
commit
32dbe3f86a
@ -57,6 +57,7 @@ export default ['$scope', '$stateParams', '$state', '$filter', 'GetBasePath', 'Q
|
||||
$scope.collection = res.data.results;
|
||||
$scope.$emit('updateDataset', res.data);
|
||||
});
|
||||
$('html, body').animate({scrollTop: 0}, 0);
|
||||
};
|
||||
|
||||
function calcLast() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user