Few questions regarding AG-Grid

Hello @acidkans,

You’ll need to do something like this:

Add to layout

dcc.Input(id=“cell_editing”, style={“display”: “none”})

For the grid, you need to use the api in a clientside callback to add listeners to cellEditingStarted and cellEditingStopped:

app.clientside_callback(
   “”” function (id) {
   dash_ag_grid.getApiAsync(id).then((grid) => {
      grid.addEventListener(“cellEditingStarted”, () => {document.getElementById(“cell_editing”)
.value = “True”
.update()})
grid.addEventListener(“cellEditingStopped”. () => {
    document.getElementById(“cell_editing”)
.value = “False”
.update()

})
})
    return dash_clientside.no_update
}”””,
Output(“grid”, “id”),
Input(“grid”, “id”)

)

Then you need to check the value of the cell_editing in the n_intervals callback, if the value ==“True” then don’t perform the query.

Sorry if there are formatting errors, I typed this all on my phone.

I’m also not 100% sure that this will work exactly as coded, but the mechanism should be correct.