Hello everyone,
I am trying to create a dropdown list in the cells of aggrid. So far so good but it doesn’t display the full text if the text is too long:
Here is the code for this example:
import streamlit as st
import pandas as pd
from st_aggrid import AgGrid, GridOptionsBuilder, JsCode
df = pd.DataFrame(
"",
index=range(10),
columns=list("abcde"),
)
gb = GridOptionsBuilder.from_dataframe(df)
gb.configure_default_column(editable=True)
gb.configure_column('a',
cellEditor='agRichSelectCellEditor',
cellEditorParams={'values': ['1abcdefg', '1abcdefg2abcdefg', '1abcdefg2abcdefg3abcdefg',
'1abcdefg2abcdefg3abcdefg4abcdefg',
'1abcdefg2abcdefg3abcdefg4abcdefg5abcdefg6abcdefg' ]},
cellEditorPopup=True
)
gb.configure_grid_options(enableRangeSelection=True)
response = AgGrid(
df,
gridOptions=gb.build(),
fit_columns_on_grid_load=True,
allow_unsafe_jscode=True,
enable_enterprise_modules=True
)
Is there any way to either wrap the text or set the width of the dropdown?
Thank you.