diff --git a/CHANGELOG.md b/CHANGELOG.md index a4bb9f02..a03dc1a8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D ### Fixed - [#454](https://github.com/plotly/dash-ag-grid/pull/454) fixes issue where a rowCount of 0 would cause the grid not to display new data +- [#417](https://github.com/plotly/dash-ag-grid/issues/417) fix grid rendering when `getRowId` is explicitly set to `None` ## [35.2.0] - 2026-04-03 ### Added diff --git a/src/lib/fragments/AgGrid.react.js b/src/lib/fragments/AgGrid.react.js index dd5ed434..0ca51e81 100644 --- a/src/lib/fragments/AgGrid.react.js +++ b/src/lib/fragments/AgGrid.react.js @@ -1587,6 +1587,9 @@ export function DashAgGrid(props) { const convertedProps = convertAllProps( omit(NO_CONVERT_PROPS, {...dashGridOptions, ...restProps}) ); + if (convertedProps.getRowId === null) { + delete convertedProps.getRowId; + } if ('theme' in convertedProps) { if (typeof convertedProps.theme === 'function') { diff --git a/tests/test_get_row_id.py b/tests/test_get_row_id.py new file mode 100644 index 00000000..882caf39 --- /dev/null +++ b/tests/test_get_row_id.py @@ -0,0 +1,19 @@ +import dash_ag_grid as dag +from dash import Dash +from . import utils + + +def test_get_row_id_none_renders(dash_duo): + app = Dash(__name__) + app.layout = [ + dag.AgGrid( + id="grid", + rowData=[{"test": 1}], + columnDefs=[{"field": "test"}], + getRowId=None, + ) + ] + + dash_duo.start_server(app) + grid = utils.Grid(dash_duo, "grid") + grid.wait_for_cell_text(0, 0, "1")