Skip to content

Commit

Permalink
update timeline and add get_props definition
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnMarieW committed Dec 13, 2024
1 parent 3894770 commit 7efe5e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/ts/components/core/timeline/Timeline.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
12 changes: 12 additions & 0 deletions src/ts/global.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
export {};

declare global {
interface Window {
dash_clientside: {
get_props: (
componentPathOrId: string | string[],
...propPath: string[]
) => any;
};
}
}

0 comments on commit 7efe5e6

Please sign in to comment.