-
-
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
Dev-tools UI - dropdown options bug #708
Comments
I am having the same problem. I have a The error is triggered if all three of the options at the bottom of this script are set. Setting any one of them to false will allow the app to work: import dash
import dash_core_components as dcc
import dash_html_components as html
app = dash.Dash(__name__)
app.layout = html.Div(children=[
dcc.Dropdown(
id='dropdown',
options=[
{'label': 'String value', 'value': 'string'},
{'label': 'List value', 'value': ['list', 'of', 'things']}
]
)
])
if __name__ == '__main__':
app.scripts.config.serve_locally = True
app.run_server(dev_tools_props_check=True, dev_tools_serve_dev_bundles=True) Versions:
|
thanks for trying the dev-tools and report the issue here. @OwenLund, I was able to see the errors in dev UI using your code snippet the behavior is expected because the value field inside options is expected to be either a @slishak, to be clarified here you don't necessarily need the serve_locally=True to see the dev_ui feature, but you will need it if you want to live debug the js code with the browser. your error is also expected as you were feeding the value a list of strings instead of a single string. if you need a more flexible data structure for options, that's another discussion, please free to post it on plotly dash community https://community.plot.ly/c/dash if you guys are following the dash docs https://dash.plot.ly/dash-core-components/dropdown, I do see an opportunity to improve the document as the description is not clear about the rule. I will create an issue in the relevant part to improve it. |
Ah right, thanks for the clarification. I thought I remembered reading a long time ago that in |
Update plotly.js to 1.51.2
Hi, I believe I've found some unexpected behavior with the new dev-tools UI feature.
When a dropdown's options contains a null/NaN value - an error appears in the new UI and the dropdown is not rendered in the browser (however no errors are shown in the console). If the app is run with debug=False, the dropdown renders and the nan value appears in the options (but cannot be selected?).
Unfortunately I'm not sure what the expected behavior should be in this scenario - or if this is a valid issue. Please feel free to remove if not.
The text was updated successfully, but these errors were encountered: