Hi, I currently can’t find a method or an attribute that return all component ids of app.layout (nested id included also). It would be nice if someone can help me.
I would like a return like a list or dictionary of some sorts.
elements = []
for pg in dash.page_registry:
data = dash.page_registry[pg]['layout']
try:
for i in data:
elements.append(i)
except:
pass
data = dash.get_app().layout
try:
for i in data:
elements.append(i)
except:
pass
print(elements)
Issue that this runs into is when the layout’s of pages are functions.
Thanks, great tip @jinnyzor . I have another question, is it possible to change the id of an existing component in the layout using a callback. Something like this: