Disable the search option from the Dropdown

Hello ,
I have added the dropdown button and i am using the lux theme. In the dropdown , I am able to add the text on my own …I want to disable this option… Can anyone help me with this .

Hello @Lucifer,

If you are using dcc.Dropdown, you can do this by adding searchable=False.

1 Like

Thanks a lot …
Can u also tell me how can i align the dropdown list with the dropdown bar…(As u can see in the image the list appears a little bit to the left and is creating some issues.)

1 Like

Oh, that is strange.

Can you show your code? It seems like maybe you have some styling that is affecting it.

dbc.Label('Department: ', style={'margin-left': '13px'}),
                        'width': '90%',
                        'margin-left': '7px',
                        'height': '47px', 'width': '360px',
                        'text-align': 'left',
                        {'label': 'Tech', 'value': 'Tech'},
                        {'label': 'Operations', 'value': 'Operations'},
                    # value='Operations',

Sorry for the late reply …
This is the code for the dropdown and their is no code in css other than this.

Remove that, and see if it lines up. :slight_smile:

Thanks a lot

1 Like