TextPanel: Fix content overflow issue (#26612)

This commit is contained in:
Torkel Ödegaard 2020-07-27 08:00:57 +02:00 committed by GitHub
parent f4ec92215b
commit ae3c285312
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,7 +6,7 @@ import { PanelProps, renderMarkdown, textUtil } from '@grafana/data';
import config from 'app/core/config';
// Types
import { TextOptions } from './types';
import { stylesFactory } from '@grafana/ui';
import { stylesFactory, CustomScrollbar } from '@grafana/ui';
import { css, cx } from 'emotion';
import DangerouslySetHtmlContent from 'dangerously-set-html-content';
@ -80,7 +80,11 @@ export class TextPanel extends PureComponent<Props, State> {
render() {
const { html } = this.state;
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>
);
}
}