mirror of
https://github.com/grafana/grafana.git
synced 2024-12-02 05:29:42 -06:00
fix: when navigating, scroll to top
This commit is contained in:
parent
3d2d789ca2
commit
1db9aeaac3
@ -8,6 +8,10 @@ export function geminiScrollbar() {
|
|||||||
|
|
||||||
let scrollbar = new PerfectScrollbar(elem[0]);
|
let scrollbar = new PerfectScrollbar(elem[0]);
|
||||||
|
|
||||||
|
scope.$on('$routeChangeSuccess', () => {
|
||||||
|
elem[0].scrollTop = 0;
|
||||||
|
});
|
||||||
|
|
||||||
scope.$on('$destroy', () => {
|
scope.$on('$destroy', () => {
|
||||||
scrollbar.destroy();
|
scrollbar.destroy();
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user