Streamlit creating an extra widget when creating dynamic widgets from a list or loop

I am developing an app where I need to generate widgets dynamically from a list, list has 4 items but streamlit is generating five widgets.

  1. I am running the app locally
  2. Streamlit version 1.31, Python 3.10.5
with manage_connection_tab:
    col1, col2, col3 = st.columns(3)
    for i in range(4):
        c_name = col1.text('name')
        c_edit_button = col2.button('Edit', key=f"edit{i}")
        c_delete_button = col3.button('Delete', key=f"delete{i}")

streamlit issue

I can count only 4 widgets in each column. Is the screenshot cropped?

Now I also see it, what a bummer.
Sorry for wasting everyone’s time

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.