79142750

Date: 2024-10-30 20:53:35
Score: 2
Natty:
Report link

By checking their docs example

app.layout = html.Div([
    dcc.Dropdown(['New York City', 'Montréal', 'San Francisco'], 'Montréal')
])

Seems you just need to provide a tuple with 2 items, a list and a default value.

Maybe give this a try?

states = ['AL','AR','AZ','CA'] # ...

dcc.Dropdown(id='select_st',
             options=(states, states[-1]),
             value='FL',
             style={
                 'width':'80%', 
                 'padding':'3px', 
                 'font-size':'20px', 
                 'text-align':'left'})
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Rauuuñ