PablocFonseca / streamlit-aggrid

Implementation of Ag-Grid component for Streamlit
https://pypi.org/project/streamlit-aggrid/
MIT License
991 stars 191 forks source link

Version 0.3.4 - key doesn't refresh table #202

Open fedefusco29 opened 1 year ago

fedefusco29 commented 1 year ago

Only on version 0.3.4: When using key in AgGrid the table doesn't refresh anymore, no matter if you try to set reload_data or update_mode.

The issue doesn't appear in version 0.3.3, I currently reverted the package version, but a fix of the problem is quite urgent.

WMKTT commented 1 year ago

I think when you generate an aggrid table with a key, it will create a memory space and won't be free. When you change your df, but do not change the key, aggrid table will return the table of last key in memory space. If you change the key, i think table will reload. I set the key as the hash value of df, so when the df change, aggrid will create a new table. But here is a big problem, i find the st aggrid will never free its memory space, even i use the gc.collect() and del the variable. That makes memory leak, i cannot solve it...