-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Streamlit 1.32.1+ with streamlit_antd_components issue #183
Comments
Same issue here, using streamlit-option-menu |
After actual testing, I found out that it was extra_streamlit_components component that caused the problem, I tried to comment out the extra_streamlit_components related code in Streamlit-Authenticator, the problem never happened again when the program was running, can I change the package of cookie management to fix the problem? |
Update: |
I considered doing this myself and perhaps I will implement it, but until Streamlit has a native way to read and write cookies, then I cannot fully replace the streamlit cookies manager. |
I guess this works as a temporary solution until streamlit natively supports cookies, maybe the st.context in streamlit 1.37 means that this day won't be too long? |
Streamlit-Authenticator (0.32, 0.33) streamlit_antd_components (0.3.2)
In streamlit 1.32.0 the code runs very stably, when I update to a later version of streamlit (including the latest 1.37), streamlit-authenticator does not work properly with streamlit_antd_components.
When I log in to the main page, the menu menu will not be displayed, and I need to manually refresh it once by clicking the R key on the keyboard. If I refresh the web page, the menu menu will disappear, and I need to reuse the R key to refresh it to be displayed, if I don't use Streamlit-Authenticator, streamlit_antd_components work fine, I removed all the other redundant code, leaving only the most basic part to reproduce the problem, do you encounter the same problem? Here's the code I reproduced:
`
import streamlit as st
import streamlit_authenticator as stauth
import streamlit_antd_components as sac
import yaml
from yaml.loader import SafeLoader
st.set_page_config()
with open('config/config.yaml', encoding='utf-8') as file:
config = yaml.load(file, Loader=SafeLoader)
authenticator = stauth.Authenticate(
config['credentials'],
config['cookie']['name'],
config['cookie']['key'],
config['cookie']['expiry_days'],
config['preauthorized'],
)
if not st.session_state["authentication_status"]:
login_in = authenticator.login(
location='main',
)
if st.session_state["authentication_status"]:
with st.sidebar:
menu_select = sac.menu(
[
sac.MenuItem('Home', icon='house-fill'),
sac.MenuItem('update', icon='calendar2-range-fill', tag=[sac.Tag('New', color='red')]),
sac.MenuItem('database', icon='file-earmark-font-fill'),
],
open_all=False,
height=680,
indent=20,
index=1,
key='menu_select',
size='md',
)
`
The text was updated successfully, but these errors were encountered: