Popover in the sidebar

Hello,
I got a st.popover with 3 columns inside. I can’t put the popover in the middle of the sidebar because there " **StreamlitAPIException** : Columns cannot be placed inside other columns in the sidebar. This is only possible in the main area of the app."

Is there a way to manage this ? Will it be implemented ? (because the st.columns inside the popover is not really inside the sidebar :D)

image
Goal :
image

Thanks !

Hi @Faltawer! Mind sharing the code for this streamlit app so we can take a look?

Hi @Faltawer , you could probably do something like this:

st.set_page_config(initial_sidebar_state = "expanded")

with st.sidebar:
  st.caption('👩🏻‍💼 Clinical trial')
  s1, s2, s3 = st.columns((2.5,1.2,1))
  sb = s1.selectbox('', ['DUMMY'], label_visibility="collapsed")
  with s2.popover("📥"): st.html("<h1>Config</h1>")
  s3.button('💾')

Cheers

Here a example :

        col1, col2, col3 = st.sidebar.columns(3)
        col1.write('test')
        col2.button('Click me')
        with st.sidebar.popover('Popover with columns (WORKING)'):
            col1, col2 = st.columns(2)
            col1.write('INSIDE THE POPOVER')
            col2.button('DO SOMETHING')

        with col3.popover('Popover with columns (NOT WORKING)'):
            col1, col2 = st.columns(2)
            col1.write('INSIDE THE POPOVER')
            col2.button('DO SOMETHING')