fix: percentage-based heights were not applied in updated scrollable iframe container

pull/107120/head
Paul Marbach 6 months ago committed by Paul Marbach
parent 781d8541d6
commit a39a354ff5
  1. 8
      public/app/plugins/panel/text/TextPanel.tsx

@ -1,4 +1,4 @@
import { css } from '@emotion/css'; import { css, cx } from '@emotion/css';
import DangerouslySetHtmlContent from 'dangerously-set-html-content'; import DangerouslySetHtmlContent from 'dangerously-set-html-content';
import { useState } from 'react'; import { useState } from 'react';
import { useDebounce } from 'react-use'; import { useDebounce } from 'react-use';
@ -56,7 +56,7 @@ export function TextPanel(props: Props) {
<DangerouslySetHtmlContent <DangerouslySetHtmlContent
allowRerender allowRerender
html={processed.content} html={processed.content}
className="markdown-html" className={cx('markdown-html', styles.markdownHtml)}
data-testid="TextPanel-converted-content" data-testid="TextPanel-converted-content"
/> />
</ScrollContainer> </ScrollContainer>
@ -103,5 +103,9 @@ const getStyles = (theme: GrafanaTheme2) => ({
containStrict: css({ containStrict: css({
contain: 'strict', contain: 'strict',
height: '100%', height: '100%',
display: 'flex',
}),
markdownHtml: css({
height: '100%',
}), }),
}); });

Loading…
Cancel
Save