Summary
Every time I reload my app my layout settings change from wide to default.
Steps to reproduce
Code snippet:
main.py
import streamlit as st
from st_pages import Page, Section, show_pages, add_page_title, hide_pages
from utils.local_connection_utils import create_con_directory
def __init__():
st.session_state.page_config = st.set_page_config(page_title="etc", page_icon=None,initial_sidebar_state="expanded", layout="wide"
)
with open("css/style.css") as f:
st.markdown(f'<style>{f.read()}</style>', unsafe_allow_html=True)
__init__()
show_pages(
[
Page("main.py", "Home"),
Page("page1.py","Page 1"),
Page("page2.py", "Page 2"),
Page("page3.py","Page 3"),
]
)
Expected behavior:
On reloading on while on page 1 the layout should stay as wide but it changes to default.
Actual behavior:
The layout changes to default. Once I navigate to the main page the layout is then again loaded as wide.