Graph NG: Invalidate uPlot config on timezone changes (#29531)

This commit is contained in:
Dominik Prokop 2020-12-02 14:21:39 +01:00 committed by GitHub
parent 2a61d7ff9f
commit 974233bf81
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 2 deletions

View File

@ -160,7 +160,7 @@ export const GraphNG: React.FC<GraphNGProps> = ({
legendItemsRef.current = legendItems;
return builder;
}, [configRev]);
}, [configRev, timeZone]);
if (alignedFrameWithGapTest == null) {
return (

View File

@ -105,7 +105,6 @@ export const DEFAULT_PLOT_CONFIG = {
hooks: {},
};
//pass plain confsig object,memoize!
export const usePlotConfig = (width: number, height: number, timeZone: TimeZone, configBuilder: UPlotConfigBuilder) => {
const { arePluginsReady, plugins, registerPlugin } = usePlotPlugins();
const [isConfigReady, setIsConfigReady] = useState(false);