Hi @dataprofessor
Thanks you for your answer, but it’s not what I am looking for.
your answer is about autosize column but I write about autosize table.
I want to define the hight of the table to be max 80% of the screen.
Best regards,
Yoel
Hi,
I am also facing this issue. Is there any resolution to this problem. It becomes unusable if the columns are shown in a narrow window with only 3-4 coulmns visible.
I found a simple workaround to force AgGrid to re-render when the window is resized. I used st_screen_stats to track screen size and passed that into the AgGrid key to trigger a refresh:
from st_screen_stats import ScreenData
# Capture screen size with a slight delay for stability
screen_data = ScreenData(setTimeout=1000)
screen_info = screen_data.st_screen_data(key="screen_stats")
if screen_info:
st.session_state['screen_width'] = screen_info['innerWidth']
st.session_state['screen_height'] = screen_info['innerHeight']