Important: This documentation is about an older version. It's relevant only to the release noted, many of the features and functions have been updated or replaced. Please view the current version.
CustomScrollbar class
Wraps component into react-custom-scrollbars
Signature
export declare class CustomScrollbar extends Component<Props> Import
import { CustomScrollbar } from '@grafana/ui';Constructors
| Constructor | Modifiers | Description | 
|---|---|---|
| constructor(props) | Constructs a new instance of the CustomScrollbarclass | 
Properties
| Property | Modifiers | Type | Description | 
|---|---|---|---|
| defaultProps | static | Partial<Props> | |
| renderThumb | (thumb: ’thumb-horizontal’ | ’thumb-vertical’, passedProps: any) => JSX.Element | ||
| renderThumbHorizontal | (passedProps: any) => JSX.Element | ||
| renderThumbVertical | (passedProps: any) => JSX.Element | ||
| renderTrack | (track: ’track-vertical’ | ’track-horizontal’, hideTrack: boolean | undefined, passedProps: any) => JSX.Element | ||
| renderTrackHorizontal | (passedProps: any) => JSX.Element | ||
| renderTrackVertical | (passedProps: any) => JSX.Element | ||
| renderView | (passedProps: any) => JSX.Element | 
Methods
| Method | Modifiers | Description | 
|---|---|---|
| componentDidMount() | ||
| componentDidUpdate() | ||
| render() | ||
| updateAfterMount() | ||
| updateScroll() | 
constructor(props)
Constructs a new instance of the CustomScrollbar class
Signature
constructor(props: Props);Parameters
| Parameter | Type | Description | 
|---|---|---|
| props | Props | 
defaultProps property
Signature
static defaultProps: Partial<Props>;renderThumb property
Signature
renderThumb: (thumb: 'thumb-horizontal' | 'thumb-vertical', passedProps: any) => JSX.Element;renderThumbHorizontal property
Signature
renderThumbHorizontal: (passedProps: any) => JSX.Element;renderThumbVertical property
Signature
renderThumbVertical: (passedProps: any) => JSX.Element;renderTrack property
Signature
renderTrack: (track: 'track-vertical' | 'track-horizontal', hideTrack: boolean | undefined, passedProps: any) => JSX.Element;renderTrackHorizontal property
Signature
renderTrackHorizontal: (passedProps: any) => JSX.Element;renderTrackVertical property
Signature
renderTrackVertical: (passedProps: any) => JSX.Element;renderView property
Signature
renderView: (passedProps: any) => JSX.Element;componentDidMount method
Signature
componentDidMount(): void;Returns:
void
componentDidUpdate method
Signature
componentDidUpdate(): void;Returns:
void
render method
Signature
render(): JSX.Element;Returns:
JSX.Element
updateAfterMount method
Signature
updateAfterMount(): void;Returns:
void
updateScroll method
Signature
updateScroll(): void;Returns:
void







