diff --git a/src/plugins/indicator/renderer/IndicatorWidget.tsx b/src/plugins/indicator/renderer/IndicatorWidget.tsx index 1957f3d4..3997a2f4 100644 --- a/src/plugins/indicator/renderer/IndicatorWidget.tsx +++ b/src/plugins/indicator/renderer/IndicatorWidget.tsx @@ -18,7 +18,6 @@ const IndicatorWidget = React.forwardRef { // TODO: swap to onRender after https://github.com/gravity-ui/chartkit/issues/33 onLoad?.(); - onRender?.(); // TODO renderTime ? + onRender?.(); // TODO renderTime }); - React.useLayoutEffect(() => { - onChartLoad?.({widget: null}); - }, []); - if (isEmpty(data)) { throw new ChartKitError({ code: CHARTKIT_ERROR_CODE.NO_DATA, diff --git a/src/types/index.ts b/src/types/index.ts index c1933e08..c03b1359 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -52,7 +52,7 @@ export type ChartKitProps = { * called on mount * @param data */ - onChartLoad?: (data?: ChartKitOnChartLoad) => void; + onChartLoad?: (data?: ChartKitOnChartLoad) => void | never; onError?: ChartKitOnError; } & {[key in keyof Omit]: ChartKitWidget[T][key]};