Documentation for automated readers
A curated documentation index is available at: https://grafana.com/llms.txt
A complete documentation index is available at: https://grafana.com/llms-full.txt
These indexes can help with page discovery before fetching individual documents.
This page is also available in Markdown, which may be easier for automated readers and AI tools to parse than HTML. The Markdown version is available at https://grafana.com/docs/grafana/v7.1/packages_api/ui/customscrollbar.md, or by sending Accept: text/markdown to https://grafana.com/docs/grafana/v7.1/packages_api/ui/customscrollbar/. For broader documentation discovery, the curated index is available at https://grafana.com/llms.txt and the complete index is available at https://grafana.com/llms-full.txt.
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 CustomScrollbar class |
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