I’ve been looking for a way to list all the current loaded ID’s.
The only requirement is that it has to be done outside of a callback. I think this is possible because I can get an error that lists them:
I guess my question is. Where is the list in the error stored/how do I generate it myself?
Hi,
I believe this error is generated on the JS side.
One alternative is to use the approach described in this post, except that each node of app.layout
tree has to be parsed to json using the self.to_json_plotly()
method individually… So, in principle, this could be quickly implemented with a recurrent function.
Another option is to use to_json_plotly
from plotly.io.json
, which (I believe) will convert the entire layout in a “JSONifiable” string (json.loads
transforms to dict). You will again need some recurrency to find ["props"]["id"]
for each component where id
exists.
There might be a better “builtin” method to do that, so I hope someone more knowledgeable on the Dash internals will jump in this thread. Hope that this helps in the meantime!