mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Merge pull request #15713 from grafana/scrollbar-right-side
Fixed right side scrollbar margin on dashboard page
This commit is contained in:
commit
328eea3a29
@ -1,4 +1,4 @@
|
|||||||
import React, { PureComponent } from 'react';
|
import React, { Component } from 'react';
|
||||||
import isNil from 'lodash/isNil';
|
import isNil from 'lodash/isNil';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import Scrollbars from 'react-custom-scrollbars';
|
import Scrollbars from 'react-custom-scrollbars';
|
||||||
@ -20,7 +20,7 @@ interface Props {
|
|||||||
/**
|
/**
|
||||||
* Wraps component into <Scrollbars> component from `react-custom-scrollbars`
|
* Wraps component into <Scrollbars> component from `react-custom-scrollbars`
|
||||||
*/
|
*/
|
||||||
export class CustomScrollbar extends PureComponent<Props> {
|
export class CustomScrollbar extends Component<Props> {
|
||||||
static defaultProps: Partial<Props> = {
|
static defaultProps: Partial<Props> = {
|
||||||
autoHide: false,
|
autoHide: false,
|
||||||
autoHideTimeout: 200,
|
autoHideTimeout: 200,
|
||||||
|
@ -268,7 +268,12 @@ export class DashboardPage extends PureComponent<Props, State> {
|
|||||||
onAddPanel={this.onAddPanel}
|
onAddPanel={this.onAddPanel}
|
||||||
/>
|
/>
|
||||||
<div className="scroll-canvas scroll-canvas--dashboard">
|
<div className="scroll-canvas scroll-canvas--dashboard">
|
||||||
<CustomScrollbar autoHeightMin={'100%'} setScrollTop={this.setScrollTop} scrollTop={scrollTop}>
|
<CustomScrollbar
|
||||||
|
autoHeightMin={'100%'}
|
||||||
|
setScrollTop={this.setScrollTop}
|
||||||
|
scrollTop={scrollTop}
|
||||||
|
className="custom-scrollbar--page"
|
||||||
|
>
|
||||||
{editview && <DashboardSettings dashboard={dashboard} />}
|
{editview && <DashboardSettings dashboard={dashboard} />}
|
||||||
|
|
||||||
{initError && this.renderInitFailedState()}
|
{initError && this.renderInitFailedState()}
|
||||||
|
@ -109,6 +109,7 @@ exports[`DashboardPage Dashboard init completed Should render dashboard grid 1`
|
|||||||
autoHide={false}
|
autoHide={false}
|
||||||
autoHideDuration={200}
|
autoHideDuration={200}
|
||||||
autoHideTimeout={200}
|
autoHideTimeout={200}
|
||||||
|
className="custom-scrollbar--page"
|
||||||
hideTracksWhenNotNeeded={false}
|
hideTracksWhenNotNeeded={false}
|
||||||
scrollTop={0}
|
scrollTop={0}
|
||||||
setScrollTop={[Function]}
|
setScrollTop={[Function]}
|
||||||
@ -344,6 +345,7 @@ exports[`DashboardPage When dashboard has editview url state should render setti
|
|||||||
autoHide={false}
|
autoHide={false}
|
||||||
autoHideDuration={200}
|
autoHideDuration={200}
|
||||||
autoHideTimeout={200}
|
autoHideTimeout={200}
|
||||||
|
className="custom-scrollbar--page"
|
||||||
hideTracksWhenNotNeeded={false}
|
hideTracksWhenNotNeeded={false}
|
||||||
scrollTop={0}
|
scrollTop={0}
|
||||||
setScrollTop={[Function]}
|
setScrollTop={[Function]}
|
||||||
|
Loading…
Reference in New Issue
Block a user