Flickering issue on dataframe

@st.fragment(run_every='10s')
def process_table_main():

    updated_df = get_updated_data()

    selected_rows = st.dataframe(
        updated_df,
        on_select="rerun",
        selection_mode=["multi-row"]
        )

flickering issue on dataframe when select option is given, without select option it is updating smoothly. How can I fix this?

1 Like

Hey @Pradeep, I have tried to reproduce this but wasn’t able to. It would be great if you could open a GitHub issue Issues · streamlit/streamlit · GitHub and answer some of the template questions there, for example which Streamlit version you are using etc. Also, it’d be great if you could provide a more complete example, e.g. what get_updated_data() is returning.

Hi @raethlein , thanks for the reply. Every 10 seconds, I fetch a DataFrame from the get_updated_data() function. Each time, some values update, and new rows are also added.

The issue is that,
when I use st.dataframe() without the select option, the new values and rows update smoothly.

	```
	selected_rows = st.dataframe(
				st.session_state.positions,
				)
	```

However, when I use the select option in st.dataframe(), it flickers.

			
	```
	selected_rows = st.dataframe(
					st.session_state.positions,
					on_select="rerun",
					selection_mode=["multi-row"]
					)
	```
	The same problem occurs with st.data_editor(). How can I resolve this issue?

Streamlit version - 1.38.0

Would it be possible for you to share a screenrecord for both states? It seems like I am not able to reproduce this locally.

@raethlein
I’m unable to share a screen recording publicly. However, I can share it privately if that works for you.