Quantcast
Channel: 🎛️ Dash - Plotly Community Forum
Viewing all articles
Browse latest Browse all 6271

How to control the number of html Div to display?

$
0
0

First of all, apologies for no code included. I have a very generic question which is not really code specific.

I have a list with unknown length (could be anywhere from 0-5 items), and I want to create html Div based on the length of the list.

For example,
If the list contains 1 item, 1 html.Div() will be created and displayed.
If the list contains 2 item, 2 html.Div() will be created and displayed.
and so on…

Because those html.Div() is kind of “hard-coded” inside the app.layout. I’m not sure if there’s a way to iterate through my list then create those html.Div() based on the length of the list? If not, what’s the best way to achieve this?

Thanks!
Jay

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 6271

Trending Articles