From d04d4782b73f81d9e2fcbbdb4b10ae8cdf28cb35 Mon Sep 17 00:00:00 2001 From: Ashley Harrison Date: Thu, 2 Oct 2025 14:57:00 +0100 Subject: [PATCH] TextPanel: Fix `CodeEditor` not appearing properly (#111937) set width=100% on the CodeEditor --- .../plugins/panel/text/TextPanelEditor.tsx | 34 ++++++------------- 1 file changed, 11 insertions(+), 23 deletions(-) diff --git a/public/app/plugins/panel/text/TextPanelEditor.tsx b/public/app/plugins/panel/text/TextPanelEditor.tsx index 75d8f50810e..78bc1fc1600 100644 --- a/public/app/plugins/panel/text/TextPanelEditor.tsx +++ b/public/app/plugins/panel/text/TextPanelEditor.tsx @@ -1,6 +1,5 @@ import { css, cx } from '@emotion/css'; import { useMemo } from 'react'; -import AutoSizer from 'react-virtualized-auto-sizer'; import { GrafanaTheme2, StandardEditorProps } from '@grafana/data'; import { @@ -25,26 +24,17 @@ export const TextPanelEditor = ({ value, onChange, context }: StandardEditorProp return (
- - {({ width }) => { - if (width === 0) { - return null; - } - return ( - - ); - }} - +
); }; @@ -52,8 +42,6 @@ export const TextPanelEditor = ({ value, onChange, context }: StandardEditorProp const getStyles = (theme: GrafanaTheme2) => ({ editorBox: css({ label: 'editorBox', - border: `1px solid ${theme.colors.border.medium}`, - borderRadius: theme.shape.radius.default, margin: theme.spacing(0.5, 0), width: '100%', }),