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

onGridReady passed in via gridOption is not used #226

Open
daniellowtw opened this issue Jun 14, 2023 · 0 comments
Open

onGridReady passed in via gridOption is not used #226

daniellowtw opened this issue Jun 14, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@daniellowtw
Copy link

daniellowtw commented Jun 14, 2023

I noticed that passing onGridReady handler in

    grid_option_builder.configure_grid_options(
        onGridReady=st_aggrid.JsCode("""
        function(params) { 
        alert(1);
        }
        """)
    )

does not get triggered but changing onGridReady to onCellClicked works. Upon digging into the code, I noticed that when instantiating the <AgGridReact> component (src), onGridReady is explicitly passed in as a react prop. This will overwrite whatever value passed in by the user in gridOption (src).

This prevents downstream streamlit apps from hooking into this event, which I think severely limits customization (such as setting default filters based on other streamlit components.

I think the field passed in by the user in gridOption should be chained to the one defined defined in the React component provided by this library.

@PablocFonseca PablocFonseca added the enhancement New feature or request label Mar 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants