We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Not able to retains the values selected in previous tab if the users switch b/w the tabs
`from st_on_hover_tabs import on_hover_tabs import streamlit as st
if 'source_connection' not in st.session_state: st.session_state['source_connection'] = None
if 'hover_tab' not in st.session_state: st.session_state['hover_tab'] = 'Table Config'
st.session_state['source_tables_config'] = ['Test1', 'Test2']
with st.sidebar: hover_tabs = on_hover_tabs(tabName=['Table Config', 'Validations', 'Test Report', 'Others'], iconName=['engineering', 'rule', 'receipt long', 'share'], default_choice=0) st.session_state['hover_tab'] = hover_tabs
if st.session_state['hover_tab'] == 'Table Config': st.session_state['source_connections'] = sorted(st.session_state['source_tables_config']) st.selectbox( ':violet[Select Source Database Name :red[*]]', st.session_state['source_connections'], index=None, placeholder="Source Databases", key='source_connection' )
elif st.session_state['hover_tab'] == 'Test Report': # Add your code for the 'Test Report' tab here st.write("Test Report content goes here.") `
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Not able to retains the values selected in previous tab if the users switch b/w the tabs
`from st_on_hover_tabs import on_hover_tabs
import streamlit as st
Initialize session state variables if they are not already set
if 'source_connection' not in st.session_state:
st.session_state['source_connection'] = None
if 'hover_tab' not in st.session_state:
st.session_state['hover_tab'] = 'Table Config'
st.session_state['source_tables_config'] = ['Test1', 'Test2']
Sidebar with hover tabs
with st.sidebar:
hover_tabs = on_hover_tabs(tabName=['Table Config', 'Validations', 'Test Report', 'Others'],
iconName=['engineering', 'rule', 'receipt long', 'share'], default_choice=0)
st.session_state['hover_tab'] = hover_tabs
Display content based on the selected tab
if st.session_state['hover_tab'] == 'Table Config':
st.session_state['source_connections'] = sorted(st.session_state['source_tables_config'])
st.selectbox(
':violet[Select Source Database Name :red[*]]',
st.session_state['source_connections'],
index=None,
placeholder="Source Databases",
key='source_connection'
)
elif st.session_state['hover_tab'] == 'Test Report':
# Add your code for the 'Test Report' tab here
st.write("Test Report content goes here.")
`
The text was updated successfully, but these errors were encountered: