added slider to sidebar controlling the grid height (instead of auto height)
This commit is contained in:
@ -17,7 +17,8 @@ icon = Path(__file__).parent.parent / "icon.png"
|
||||
st.set_page_config(
|
||||
page_title="stand",
|
||||
page_icon=str(icon),
|
||||
layout="wide"
|
||||
layout="wide",
|
||||
initial_sidebar_state="collapsed"
|
||||
)
|
||||
|
||||
hide_UI_elements()
|
||||
|
@ -1,3 +1,4 @@
|
||||
import streamlit as st
|
||||
from st_aggrid import AgGrid, GridOptionsBuilder
|
||||
|
||||
|
||||
@ -13,12 +14,19 @@ def aggrid(df, reload_data=False):
|
||||
sortable=True
|
||||
)
|
||||
|
||||
gob.configure_auto_height(True)
|
||||
height = st.sidebar.slider(
|
||||
"Grid Height",
|
||||
min_value=100, max_value=1500, value=500, step=10,
|
||||
key="gridheight"
|
||||
)
|
||||
|
||||
# gob.configure_auto_height(True)
|
||||
go = gob.build()
|
||||
|
||||
response = AgGrid(
|
||||
df,
|
||||
go,
|
||||
height=height,
|
||||
theme="streamlit",
|
||||
fit_columns_on_grid_load=True,
|
||||
reload_data=reload_data,
|
||||
|
Reference in New Issue
Block a user