From 0392bf57247e4b6871869db68609fc2bc749f9f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Wed, 12 Nov 2025 16:04:35 +0100 Subject: [PATCH] ExternalPlugins: Restore backward compatability for util function (#113735) * ExternalPlugins: Restore backward compatability for util function * tweak * fix withValue => withTitle --- packages/grafana-ui/src/options/builder/text.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/options/builder/text.tsx b/packages/grafana-ui/src/options/builder/text.tsx index 79ec1bbb8b8..4bd507aaf10 100644 --- a/packages/grafana-ui/src/options/builder/text.tsx +++ b/packages/grafana-ui/src/options/builder/text.tsx @@ -9,8 +9,13 @@ import { OptionsWithTextFormatting } from '@grafana/schema'; */ export function addTextSizeOptions( builder: PanelOptionsEditorBuilder, - options: { withValue?: boolean; withTitle?: boolean; withPercentChange?: boolean } + options: { withValue?: boolean; withTitle?: boolean; withPercentChange?: boolean } = { withTitle: true } ) { + // if called from old plugins when parameter was withTitle boolean + if (typeof options === 'boolean') { + options = { withTitle: options }; + } + const category = [t('grafana-ui.builder.text.category-text-size', 'Text size')]; if (options.withTitle) { builder.addNumberInput({