✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
🧬 Learn how to build RNA-Seq data apps with Python & Dash. Register for the May 20 Webinar!

dbc.DropdownMenu style: CSS cursor property not working

Hi, although the dbc.DropdownMenu has a disable property, i’ve failed to apply the CSS cursor property to not-allowed.
Any known workaround?
Snippet:
image

More details:
image
Many thanks!

Hi together,
As a matter of clarification, with dbc.Button the implementation works perfectly, both with the disabled and style={“cursor”: “pointer”}.

Snippet:

dbc.Button('Not Allowed Button Example', id='not_allowed_btn', disabled=True, color="info", className="mr-1", style={"cursor": "not-allowed"})])

Interestingly, with the dbc.DropdownMenu, it doesn’t.

Cheers

Hey @vcmorini

Use toggle_style instead of style and it should work.

dbc.DropdownMenu(..., toggle_style={"cursor": "not-allowed"}, disabled=True)
1 Like

Hi @tcbegley, thanks, it worked perfectly!

1 Like