Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V.03 theme no longer available in AgGrid #174

Closed
nafets33 opened this issue Dec 19, 2022 · 2 comments
Closed

V.03 theme no longer available in AgGrid #174

nafets33 opened this issue Dec 19, 2022 · 2 comments

Comments

@nafets33
Copy link

Code works fine in 2.3 but not in 3 .. can you theme to the config file in V3?

ValueError: light is not valid. Available options: {'STREAMLIT': <AgGridTheme.STREAMLIT: 'streamlit'>, 'ALPINE': <AgGridTheme.ALPINE: 'alpine'>, 'BALHAM': <AgGridTheme.BALHAM: 'balham'>, 'MATERIAL': <AgGridTheme.MATERIAL: 'material'>}
File "C:\Users\sstapinski\pollen\lib\site-packages\st_aggrid__init.py", line 295, in AgGrid
raise ValueError(f"{theme} is not valid. Available options: {AgGridTheme.members__}")
streamlit-aggrid==0.3.3


import streamlit as st
import pandas as pd
import numpy as np

from st_aggrid import AgGrid, GridOptionsBuilder

df = pd.DataFrame(
    np.random.randint(0, 100, 50).reshape(-1, 5),
    index=range(10),
    columns=list("abcde"),
)

available_themes = ["streamlit", "light", "dark", "blue", "fresh", "material"]
selected_theme = st.selectbox("Theme", available_themes)

gb = GridOptionsBuilder.from_dataframe(df)
if st.checkbox('Pre-select rows 4 and 6 when loading.'):
    gb.configure_selection('multiple', pre_selected_rows=[3,5])

response = AgGrid(
    df,
    editable=True,
    gridOptions=gb.build(),
    data_return_mode="filtered_and_sorted",
    update_mode="no_update",
    fit_columns_on_grid_load=True,
    theme=selected_theme
)
@la2yyu
Copy link

la2yyu commented Jan 4, 2023

theme "balham", "alpine", "material", "streamlit" is work, others are not。
looking forward to repair

@fplanque
Copy link

I think this issue is fixed on v 0.3.2 .
I remember that the light theme was broken at some point but now I can use it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants