I’m using Streamlit + st-aggrid and I’m seeing a weird issue:
-
Works on my local machine -
Works after deployment for my colleagues -
After deployment, on my machine/browser, the checkboxes are not clickable (both row selection checkbox and a boolean “locked” checkbox column)
This is the grid call:
grid_resp = AgGrid(
t,
gridOptions=grid_options,
update_mode=GridUpdateMode.VALUE_CHANGED | GridUpdateMode.SELECTION_CHANGED,
data_return_mode=DataReturnMode.AS_INPUT,
allow_unsafe_jscode=True,
fit_columns_on_grid_load=True,
theme="streamlit",
height=520,
key=f"supplier_grid_{st.session_state.get('bulk_widget_reset_counter', 0)}",
)
What I’m trying to achieve
-
Column Select → checkbox selection of rows (
checkboxSelection=True,headerCheckboxSelection=True) -
Column locked → editable boolean checkbox (
agCheckboxCellRenderer/agCheckboxCellEditor)
Relevant grid config snippets
Selection column:
gb.configure_selection(
selection_mode="multiple",
use_checkbox=False,
suppressRowClickSelection=True,
suppressRowDeselection=False
)
gb.configure_column(
"Select",
checkboxSelection=True,
headerCheckboxSelection=True,
headerCheckboxSelectionFilteredOnly=True,
pinned="left",
width=90,
sortable=False,
filter=False,
)
Locked column:
can_edit_locked = JsCode("""
function(p){
if (!p.data) return false;
if (p.data.__blocked) return false;
return !!p.data.__can_lock;
}
""")
gb.configure_column(
"locked",
header_name="Locked",
editable=can_edit_locked,
cellRenderer="agCheckboxCellRenderer",
cellEditor="agCheckboxCellEditor",
type=["booleanColumn"],
width=80,
)
Row id + immutability:
grid_options["immutableData"] = True
grid_options["getRowId"] = JsCode("function(p){ return String(p.data.unique_id); }")
Symptom (deployed only, only on my machine)
-
Clicking the Select checkbox does nothing (no selection change)
-
Clicking locked checkbox does nothing (no value change)
-
The grid renders fine; it’s just that checkbox clicks don’t register
Important detail
This happens only for me after deployment. Same deployment works for colleagues on their machines.
What I tried already
-
Hard refresh + clear cache
-
Tried different browser / incognito
-
Tried disabling extensions
-
Tried changing
key=to force a remount -
Tried turning off
immutableData -
Tried
GridUpdateMode.MODEL_CHANGEDandGridUpdateMode.SELECTION_CHANGEDseparately -
Tried removing custom CSS that hides the AG Grid header menu (no change)
What could cause checkbox click events to be blocked only for specific clients after deployment?
Python version is 3.12
streamlit==1.41.1
streamlit-aggrid==1.1.0