Hi Streamlit community!
When putting sliders in a column(st.beta_columns), all the sliders in the colums get remounted when updating a single one. When just placing them in a for loop without placing them in a column it only reloads the changed slider as expected. Is there a way to fix this?
Example code:
import streamlit as st
import numpy as np
img_amount = st.sidebar.slider('amount of images', 1,100,1)
load_in_columns = st.sidebar.checkbox('load in columns')
column_amount = 3
columns = st.beta_columns(column_amount)
for i in range(0, img_amount):
column_index = i % column_amount
if load_in_columns:
with columns[column_index]:
rgb_value = st.slider('Oppacity', 1,100,1, key=str(i))
#st.image(np.full((100,100,3), [rgb_value/255*3]))
else:
rgb_value = st.slider('Oppacity', 1, 100, 1, key=str(i))
#st.image(np.full((100, 100, 3), [rgb_value/255*3]))