diff --git a/src/components/ChartKit.tsx b/src/components/ChartKit.tsx index 9cb6c326..7303cdd9 100644 --- a/src/components/ChartKit.tsx +++ b/src/components/ChartKit.tsx @@ -17,7 +17,7 @@ type ChartKitComponentProps = Omit, 'on const ChartKitComponent = (props: ChartKitComponentProps) => { const widgetRef = React.useRef(); - const {instanceRef, id: propsId, type, isMobile, ...restProps} = props; + const {instanceRef, id: propsId, type, isMobile, renderPluginLoader, ...restProps} = props; const ckId = React.useMemo(() => getRandomCKId(), []); const id = propsId || ckId; @@ -48,7 +48,7 @@ const ChartKitComponent = (props: ChartKitComponentProps ); return ( - }> + }>
diff --git a/src/types/index.ts b/src/types/index.ts index 754197fd..9c0570da 100644 --- a/src/types/index.ts +++ b/src/types/index.ts @@ -38,18 +38,16 @@ export type ChartKitProps = { id?: string; isMobile?: boolean; onLoad?: (data?: ChartKitOnLoadData) => void; - /** - * called on each render - * @param data - */ + /** Fires on each chartkit plugin's component render */ onRender?: (data: ChartKitOnRenderData) => void; - /** - * called on chart mount - * @param data - */ + /** Fires on chartkit plugin's component mount */ onChartLoad?: (data: ChartKitOnChartLoad) => void; - renderError?: RenderError; + /** Fires in case of unhandled plugin's exception */ onError?: ChartKitOnError; + /** Used to render user's error component */ + renderError?: RenderError; + /** Used to render user's plugin loader component */ + renderPluginLoader?: () => React.ReactNode; } & {[key in keyof Omit]: ChartKitWidget[T][key]}; export type ChartKitPlugin = {