From 95fafc381bbafe47173f802310a67e7ced243d80 Mon Sep 17 00:00:00 2001 From: "Mr.Dr.Professor Patrick" Date: Thu, 28 Jul 2022 14:34:11 +0300 Subject: [PATCH] fix: Indicator onLoad invocation fixes (#34) fix Indicator onLoad invocation --- src/plugins/indicator/renderer/IndicatorWidget.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/plugins/indicator/renderer/IndicatorWidget.tsx b/src/plugins/indicator/renderer/IndicatorWidget.tsx index ce16c0c9..fa7de396 100644 --- a/src/plugins/indicator/renderer/IndicatorWidget.tsx +++ b/src/plugins/indicator/renderer/IndicatorWidget.tsx @@ -22,9 +22,10 @@ const IndicatorWidget = React.forwardRef { + React.useLayoutEffect(() => { + // TODO: swap to onRender after https://github.com/yandex-cloud/chartkit/issues/33 onLoad?.(); - }, []); + }); if (isEmpty(data)) { throw new ChartKitError({