From 8dbd70b91b15b133a39473d55f3648b8e32fc9ad Mon Sep 17 00:00:00 2001 From: Brendan O'Handley Date: Mon, 28 Aug 2023 11:43:59 -0400 Subject: [PATCH] Prometheus: Explore expand raw results in split panel bug fix (#73864) * make switch id unique * tests * tests * use useId for switch id * space --- .../explore/PrometheusListView/RawListContainer.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/public/app/features/explore/PrometheusListView/RawListContainer.tsx b/public/app/features/explore/PrometheusListView/RawListContainer.tsx index 08d1c0e0331..f3f368cd89b 100644 --- a/public/app/features/explore/PrometheusListView/RawListContainer.tsx +++ b/public/app/features/explore/PrometheusListView/RawListContainer.tsx @@ -1,6 +1,6 @@ import { css } from '@emotion/css'; import { cloneDeep } from 'lodash'; -import React, { useEffect, useRef, useState } from 'react'; +import React, { useEffect, useId, useRef, useState } from 'react'; import { useWindowSize } from 'react-use'; import { VariableSizeList as List } from 'react-window'; @@ -113,12 +113,14 @@ const RawListContainer = (props: RawListContainerProps) => { return 1.5 * singleLineHeight + (Object.keys(item).length - valueLabels.length) * additionalLineHeight; }; + const switchId = `isExpandedView ${useId()}`; + return (
- +