-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Children array error #1026
Children array error #1026
Conversation
ie if you forget to make children an array, and just put it flat in component args
dash/development/base_component.py
Outdated
if k != "children" and isinstance(v, Component): | ||
raise TypeError( | ||
"Component detected as a prop other than `children`\n" + | ||
"Did you forget to wrap multiple `children` in an array?" + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Either a \n
or whitespace after the end of the sentence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good call -> 4d96e0d
Diff in https://percy.io/plotly/dash/builds/3264807/view/203019307/1280?mode=diff&browser=firefox&snapshot=203019307 looks related to async / the behavior is fine but without The important information is what the devtools are displaying. We could update the test to wait for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💃
Hey y'all, We're running into this exception while trying to use multiple props as Was this diff supposed to intentionally disallow this case? If not, I think we should add a |
Trying to give a more helpful error message than users encounter today, like #1024, when forgetting to wrap
children
in an array inside components. Obviously if we ever do Components as Props that would need to be taken into account here - but I suspect that would be fine, each component would need to register internally which props can accept components.optionals
CHANGELOG.md