Commit ae3c2853 by Torkel Ödegaard Committed by GitHub

TextPanel: Fix content overflow issue (#26612)

parent f4ec9221
...@@ -6,7 +6,7 @@ import { PanelProps, renderMarkdown, textUtil } from '@grafana/data'; ...@@ -6,7 +6,7 @@ import { PanelProps, renderMarkdown, textUtil } from '@grafana/data';
import config from 'app/core/config'; import config from 'app/core/config';
// Types // Types
import { TextOptions } from './types'; import { TextOptions } from './types';
import { stylesFactory } from '@grafana/ui'; import { stylesFactory, CustomScrollbar } from '@grafana/ui';
import { css, cx } from 'emotion'; import { css, cx } from 'emotion';
import DangerouslySetHtmlContent from 'dangerously-set-html-content'; import DangerouslySetHtmlContent from 'dangerously-set-html-content';
...@@ -80,7 +80,11 @@ export class TextPanel extends PureComponent<Props, State> { ...@@ -80,7 +80,11 @@ export class TextPanel extends PureComponent<Props, State> {
render() { render() {
const { html } = this.state; const { html } = this.state;
const styles = getStyles(); const styles = getStyles();
return <DangerouslySetHtmlContent html={html} className={cx('markdown-html', styles.content)} />; return (
<CustomScrollbar autoHeightMin="100%">
<DangerouslySetHtmlContent html={html} className={cx('markdown-html', styles.content)} />;
</CustomScrollbar>
);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment