PablocFonseca / streamlit-aggrid

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

Overwriting local args before checking state is bad #192

Open pavelg90 opened 1 year ago

pavelg90 commented 1 year ago

https://github.com/PablocFonseca/streamlit-aggrid/blob/baad5100646f80137d6b1ec434131cebb7299f35/st_aggrid/grid_options_builder.py#L166-L188

For example: If I set filters_panel or columns_panel to False then calling the function will go and overwrite both local variables to the default dictionaries and then https://github.com/PablocFonseca/streamlit-aggrid/blob/baad5100646f80137d6b1ec434131cebb7299f35/st_aggrid/grid_options_builder.py#L182-L182 https://github.com/PablocFonseca/streamlit-aggrid/blob/baad5100646f80137d6b1ec434131cebb7299f35/st_aggrid/grid_options_builder.py#L185-L185 https://github.com/PablocFonseca/streamlit-aggrid/blob/baad5100646f80137d6b1ec434131cebb7299f35/st_aggrid/grid_options_builder.py#L187-L187 will all result in True giving the arguments of this function zero functionality.