-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
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.
import dash
import dash_core_components as dcc
import dash_html_components as html
import numpy as np
import pandas as pd
external_stylesheets = ['https://codepen.io/chriddyp/pen/bWLwgP.css']
app = dash.Dash(__name__, external_stylesheets=external_stylesheets)
dropdown_list = pd.Series([1,2,3,np.nan])
app.layout = html.Div(children=[
dcc.Dropdown(
id='dropdown',
options=[{'label':f"Option: {i}", 'value':i} for i in dropdown_list]
)
])
if __name__ == '__main__':
app.run_server(debug=True)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels