diff --git a/packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx b/packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx index a11ca23fb94..ab949ebc99e 100644 --- a/packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx +++ b/packages/grafana-ui/src/components/CustomScrollbar/CustomScrollbar.tsx @@ -26,6 +26,7 @@ interface Props { autoHeightMin?: number | string; updateAfterMountMs?: number; onScroll?: React.UIEventHandler; + divId?: string; } /** @@ -48,6 +49,7 @@ export const CustomScrollbar = ({ scrollTop, onScroll, children, + divId, }: React.PropsWithChildren) => { const ref = useRef void }>(null); const styles = useStyles2(getStyles); @@ -110,14 +112,17 @@ export const CustomScrollbar = ({ return
; }, []); - const renderView = useCallback((passedProps: JSX.IntrinsicElements['div']) => { - // fixes issues of visibility on safari and ios devices - if (passedProps.style && passedProps.style['WebkitOverflowScrolling'] === 'touch') { - passedProps.style['WebkitOverflowScrolling'] = 'auto'; - } + const renderView = useCallback( + (passedProps: JSX.IntrinsicElements['div']) => { + // fixes issues of visibility on safari and ios devices + if (passedProps.style && passedProps.style['WebkitOverflowScrolling'] === 'touch') { + passedProps.style['WebkitOverflowScrolling'] = 'auto'; + } - return
; - }, []); + return
; + }, + [divId] + ); const onScrollStop = useCallback(() => { ref.current && setScrollTop && setScrollTop(ref.current.getValues()); diff --git a/public/app/core/components/FlaggedScroller.tsx b/public/app/core/components/FlaggedScroller.tsx index f7dbdd85dca..9d9c3cc5043 100644 --- a/public/app/core/components/FlaggedScroller.tsx +++ b/public/app/core/components/FlaggedScroller.tsx @@ -15,7 +15,7 @@ export default function FlaggedScrollbar(props: FlaggedScrollerProps) { } // Shim to provide API-compatibility for Page's scroll-related props -function NativeScrollbar({ children, scrollRefCallback, scrollTop }: FlaggedScrollerProps) { +function NativeScrollbar({ children, scrollRefCallback, scrollTop, divId }: FlaggedScrollerProps) { const styles = useStyles2(getStyles); const ref = useRef(null); @@ -33,7 +33,7 @@ function NativeScrollbar({ children, scrollRefCallback, scrollTop }: FlaggedScro return ( // Set the .scrollbar-view class to help e2e tests find this, like in CustomScrollbar -
+
{children}
); diff --git a/public/app/core/components/Page/Page.tsx b/public/app/core/components/Page/Page.tsx index 7f017fba487..f88d0dd011b 100644 --- a/public/app/core/components/Page/Page.tsx +++ b/public/app/core/components/Page/Page.tsx @@ -53,7 +53,13 @@ export const Page: PageType = ({ return (
{layout === PageLayoutType.Standard && ( - +
{pageHeaderNav && ( +
{children}
)} diff --git a/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.tsx b/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.tsx index 5454afe0892..6e9a5d659bb 100644 --- a/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.tsx +++ b/public/app/features/dashboard-scene/scene/DashboardSceneRenderer.tsx @@ -64,6 +64,8 @@ export function DashboardSceneRenderer({ model }: SceneComponentProps )}