question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[BUG] Dropdown className is not passed to HTML

See original GitHub issue

pip list

dash (1.0.2)
dash-bootstrap-components (0.7.0)
dash-core-components (1.0.0)
dash-daq (0.1.7)
dash-html-components (1.0.0)
dash-renderer (1.0.0)
dash-table (4.0.2)

Describe the bug

Writing dcc.Dropdown(id='myDropdown', className='myClass', ...) does not work.

Expected behavior

The className should be passed to the generated HTML, specifically to the div with the specified id=myDropdown.

Actual behavior

The className does not appear anywhere in the generated HTML.

Example

import dash
import dash_core_components as dcc
import dash_html_components as html

app = dash.Dash()
app.layout = dcc.Dropdown(id='myDropdown', className='myClass')
app.run_server(debug=True)

Screenshots

image

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
alexcjohnsoncommented, Aug 16, 2019

The parent_className prop of Tabs is essentially an exact match for what we talked about here - true, some of them are different states of the same element, but this one is a constant on a different element

https://github.com/plotly/dash-core-components/blob/5ed92d7a506101ccd84cc19028fc10ad8e3a3aa0/src/components/Tabs.react.js#L253

1reaction
byronzcommented, Aug 15, 2019

@wbrgss let’s bring this on Friday’s meeting

Read more comments on GitHub >

github_iconTop Results From Across the Web

Class Name and Method Name dropdowns are not present in ...
One feature that I use a lot are the two dropdown windows on the code. The left drop down is the Class Name...
Read more >
class name and method name dropdown list is missing (visual ...
I came here searching for a solution for javascript/node.js specifically (in VS 2013). Only by doing further search I found out that this ......
Read more >
How to create a multilevel dropdown menu in React
Learn how to implement the dropdown menu feature in a React project to make navigation bars dynamic and organized.
Read more >
I am trying to select one of the dropdown list value using select ...
Hi there, you are facing this error because in your code you are using class name with xpath to select the item, but...
Read more >
W3.CSS Dropdowns - W3Schools
Well organized and easy to understand Web building tutorials with lots of examples of how to use HTML, CSS, JavaScript, SQL, Python, PHP,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found