[BUG] id
passed through dcc.Loading
not visible in DOM
#2878
Labels
good first issue
suitable for newcomers
id
passed through dcc.Loading
not visible in DOM
#2878
Describe your context
Hello guys 👋
I am currently trying to pass an
id
to the dcc.Loading component or its parent container and I would like theid
to be visible in the DOM such that I can target the CSS of the components inside thedcc.Loading
via ID.Please provide us your environment, so we can easily reproduce the issue.
pip list | grep dash
belowif frontend related, tell us your Browser, Version and OS
Describe the bug
Let's take the example app below - what I would have expected is that there would be an html div visible with a className="loading" and an id="loading-id". However, if I provide the
className="loading"
I see a div but it does not have the className="loading" in the DOM nor does it have the id="loading-id" in the DOM.When I switch this to
parent_className="loading"
, now I see a div with the className="loading", but I cannot attach an id to this parent container.I am not a react expert, but from the source I can see that the
id
doesn't seem to be passed on in the return of the react component and is therefore not visible in the DOM? Is there any reason for that?dash/components/dash-core-components/src/components/Loading.react.js
Lines 128 to 133 in 09252f8
Expected behavior
I would expect the
id
being passed on to the react component and visible in the DOM, so having a <div class="loading" id="loading-id" visible in the DOM.Screenshots
The text was updated successfully, but these errors were encountered: