From a3aa387e99ce271f91de28fd4b17dbd4664b689d Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Sun, 22 May 2022 19:52:08 +0200 Subject: [PATCH] table adjusts height automatically; added title; hide hamburger menu, header and footer --- stand.py | 26 +++++++++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/stand.py b/stand.py index 2b1dd6a..88296ac 100644 --- a/stand.py +++ b/stand.py @@ -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 = """ + +""" +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,