From 5d97dbf088fe74c70bb96e31a1c09d606d65efc1 Mon Sep 17 00:00:00 2001 From: joshhunt Date: Tue, 26 Aug 2025 12:17:02 +0100 Subject: [PATCH] make ID required --- .../components/PanelEditor/OptionsPaneItemDescriptor.tsx | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx b/public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx index 0b0154628f6..185971f72ef 100644 --- a/public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/OptionsPaneItemDescriptor.tsx @@ -1,5 +1,4 @@ import { css } from '@emotion/css'; -import { uniqueId } from 'lodash'; import { ReactNode } from 'react'; import * as React from 'react'; import Highlighter from 'react-highlight-words'; @@ -25,7 +24,7 @@ export interface OptionsPaneItemInfo { overrides?: OptionPaneItemOverrideInfo[]; addon?: ReactNode; /** Must be unique on the page! */ - id?: string; + id: string; } /** @@ -36,7 +35,7 @@ export class OptionsPaneItemDescriptor { props: OptionsPaneItemInfo; constructor(props: OptionsPaneItemInfo) { - this.props = { ...props, id: props.id || uniqueId() }; + this.props = { ...props }; } render(searchQuery?: string) {