Fix nav_path_input write-after-widget error on invalid path
Use _sync_nav_path flag to defer the revert to the next rerun, before the widget is instantiated. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2
app.py
2
app.py
@@ -63,7 +63,7 @@ with st.sidebar:
|
|||||||
st.session_state.loaded_file = None
|
st.session_state.loaded_file = None
|
||||||
st.rerun()
|
st.rerun()
|
||||||
else:
|
else:
|
||||||
st.session_state.nav_path_input = str(st.session_state.current_dir)
|
st.session_state._sync_nav_path = True
|
||||||
st.rerun()
|
st.rerun()
|
||||||
|
|
||||||
# --- Favorites System ---
|
# --- Favorites System ---
|
||||||
|
|||||||
Reference in New Issue
Block a user