@Mianen Just for posterity, if anyone wants a different workaround right now, you can use experimental rerun and a flag in session state to rebuild the data editor automatically. In effect, automate that second load so the user doesn’t see or “feel” it.
import streamlit as st
import pandas as pd
if 'df' not in st.session_state:
st.session_state.df = pd.DataFrame({'A':[1,2,3,4],'B':[1,2,3,4]})
st.session_state.rerun = False
def rerun():
st.session_state.rerun = True
st.session_state.df = st.experimental_data_editor(st.session_state.df, on_change=rerun)
if st.session_state.rerun:
st.session_state.rerun = False
st.experimental_rerun()