Skip to content
This repository was archived by the owner on Jun 3, 2024. It is now read-only.

Commit bbbbbb1

Browse files
Add child.props logic back in
1 parent f73bb20 commit bbbbbb1

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

dash_core_components/dash_core_components.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/components/Tabs.react.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,19 @@ export default class Tabs extends Component {
187187
// TODO: handle components that are not dcc.Tab components (throw error)
188188
// enhance Tab components coming from Dash (as dcc.Tab) with methods needed for handling logic
189189
let childProps;
190-
childProps = child.props;
190+
191+
// TODO: fix issue in dash-renderer https://github.com/plotly/dash-renderer/issues/84
192+
if (
193+
child.props.children &&
194+
child.props.children.props &&
195+
child.props.children.props.id
196+
) {
197+
// if props appears on .children, props are coming from Dash
198+
childProps = child.props.children.props;
199+
} else {
200+
// else props are coming from React (Demo.react.js)
201+
childProps = child.props;
202+
}
191203

192204
if (!childProps.value) {
193205
childProps = {...childProps, value: `tab-${index + 1}`};

0 commit comments

Comments
 (0)