PablocFonseca / streamlit-aggrid

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

`gridOptions` dict example #47

Closed GitHunter0 closed 2 years ago

GitHunter0 commented 2 years ago

First, thank you for this much needed component!

Please, consider the MWE below. I cannot figure out the syntax to pass the list of options directly to gridOptions, could you provide an example?

from st_aggrid import AgGrid
import pandas as pd

df = pd.read_csv('https://raw.githubusercontent.com/fivethirtyeight/data/master/airline-safety/airline-safety.csv')

AgGrid(df, gridOptions= {'configure_selection':{'selection_mode':'multiple', 'use_checkbox':True}}) 
PablocFonseca commented 2 years ago

I'm working on a basic documentation. If you want to specify the gridOptions dictionary by hand, you need to describe all columns using columnDefs.

It is easier if you use the GridOptionsBuilder

GitHunter0 commented 2 years ago

Thank you @PablocFonseca , I feel like aggrid will be much more used and fully explored once a basic documentation is available. It seems to have awesome capabilities.