File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
frontend/src/app/pages/DashBoardPage/components/Widgets/DataChartWidget Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ import React, {
4040 useRef ,
4141} from 'react' ;
4242import styled from 'styled-components/macro' ;
43+ import { uuidv4 } from 'utils/utils' ;
4344import { WidgetActionContext } from '../../ActionProvider/WidgetActionProvider' ;
4445import {
4546 boardDrillManager ,
@@ -64,7 +65,9 @@ export const DataChartWidgetCore: React.FC<{}> = memo(() => {
6465 }
6566 return dashboardId ;
6667 } , [ dashboardId , renderMode ] ) ;
67-
68+ const containerId = useMemo ( ( ) => {
69+ return `${ wid } _${ uuidv4 ( ) } ` ;
70+ } , [ wid ] ) ;
6871 const { onWidgetChartClick } = useContext ( WidgetActionContext ) ;
6972 const { cacheWhRef : ref , cacheW, cacheH } = useCacheWidthHeight ( ) ;
7073 const { onWidgetGetData } = useContext ( WidgetActionContext ) ;
@@ -210,7 +213,7 @@ export const DataChartWidgetCore: React.FC<{}> = memo(() => {
210213 width = { cacheW }
211214 height = { cacheH }
212215 drillOption = { drillOption }
213- containerId = { wid }
216+ containerId = { containerId }
214217 widgetSpecialConfig = { widgetSpecialConfig }
215218 scale = { scale }
216219 />
@@ -222,13 +225,13 @@ export const DataChartWidgetCore: React.FC<{}> = memo(() => {
222225 errText ,
223226 dataset ,
224227 chart ,
225- wid ,
228+ containerId ,
226229 widgetSpecialConfig ,
227230 scale ,
228231 ] ) ;
229232
230233 return (
231- < Wrapper id = { renderMode + wid } className = "widget-chart" ref = { ref } >
234+ < Wrapper className = "widget-chart" ref = { ref } >
232235 < ChartFrameBox >
233236 < ChartDrillContext . Provider
234237 value = { {
You can’t perform that action at this time.
0 commit comments