You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jun 4, 2024. It is now read-only.
One thing that I found weird when writing the Tabs component, is that the props on children components coming from Dash are not available on props.children[0].props(for example, where props.children[0] is a Tab component for instance), but on props.children[0].props.children.props. I've went around this by having some logic saying "if child.props.children exists, the props are coming from Dash, otherwise they're coming from Demo.js", but that causes weirdness when, in JS (Demo.js or perhaps a unit test), you set children on a <Tab/>, causing the logic to pick that up as "oh, these are coming from Dash" and using the child.props.children.props which is then not the props we want!
Hope this makes sense!
The text was updated successfully, but these errors were encountered:
Right, that's because we wrap each component in a NotifyObservers component. Until tabs was written, we didn't have any components that needed to introspect their children
One thing that I found weird when writing the
Tabs
component, is that the props on children components coming from Dash are not available onprops.children[0].props
(for example, whereprops.children[0]
is aTab
component for instance), but onprops.children[0].props.children.props
. I've went around this by having some logic saying "if child.props.children exists, the props are coming from Dash, otherwise they're coming from Demo.js", but that causes weirdness when, in JS (Demo.js or perhaps a unit test), you setchildren
on a<Tab/>
, causing the logic to pick that up as "oh, these are coming from Dash" and using thechild.props.children.props
which is then not the props we want!Hope this makes sense!
The text was updated successfully, but these errors were encountered: