From 279dd411c154be73533d920a691a95c1efb2fcbb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B0=D0=B5=D0=B2=20=D0=95=D0=B2=D0=B3=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B9?= Date: Thu, 28 Jul 2022 14:29:35 +0300 Subject: [PATCH] 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({