diff --git a/src/ts/components/core/timeline/Timeline.tsx b/src/ts/components/core/timeline/Timeline.tsx index 347310a6..3e93603e 100644 --- a/src/ts/components/core/timeline/Timeline.tsx +++ b/src/ts/components/core/timeline/Timeline.tsx @@ -43,7 +43,8 @@ const Timeline = (props: Props) => { {...others} > {React.Children.map(children, (child: any, index) => { - const childProps = child.props._dashprivate_layout.props; + const childProps = window.dash_clientside.get_props(child.props.componentPath) + const renderedProps = renderDashComponents( omit(["children"], childProps), ["title", "bullet"] diff --git a/src/ts/global.d.ts b/src/ts/global.d.ts new file mode 100644 index 00000000..b162d9a0 --- /dev/null +++ b/src/ts/global.d.ts @@ -0,0 +1,12 @@ +export {}; + +declare global { + interface Window { + dash_clientside: { + get_props: ( + componentPathOrId: string | string[], + ...propPath: string[] + ) => any; + }; + } +}