table adjusts height automatically; added title; hide hamburger menu, header and footer

This commit is contained in:
2022-05-22 19:52:08 +02:00
parent fa0ae6af03
commit a3aa387e99

View File

@ -1,5 +1,5 @@
import streamlit as st
from st_aggrid import AgGrid
from st_aggrid import AgGrid, GridOptionsBuilder
import hacks
@ -8,7 +8,21 @@ from utils.st_utils import get_session_id, rerun
from utils.df_utils import to_excel_binary
st.set_page_config(layout="wide", page_icon="icon.png")
st.set_page_config(
page_title="stand",
page_icon="icon.png",
layout="wide"
)
hide_st_style = """
<style>
#MainMenu {visibility: hidden;}
footer {visibility: hidden;}
header {visibility: hidden;}
</style>
"""
st.markdown(hide_st_style, unsafe_allow_html=True)
restapi.sid = get_session_id() # rest api needs current session ID to trigger the next rerun
@ -48,15 +62,21 @@ with col1:
gob = GridOptionsBuilder.from_dataframe(df)
gob.configure_auto_height(True)
go = gob.build()
#st.write(go)
response = AgGrid(
df[::-1],
go,
filter=True,
editable=True,
sortable=True,
resizable=True,
# defaultWidth=5,
fit_columns_on_grid_load=True,
reload_data=changed,