Skip to content

Commit 28f9dbe

Browse files
authored
Merge pull request #460 from plotly/copilot/fix-grid-render-issue
Handle explicit `getRowId=None` without breaking grid initialization
2 parents 50e21d6 + 9bcb32b commit 28f9dbe

3 files changed

Lines changed: 23 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Links "DE#nnn" prior to version 2.0 point to the Dash Enterprise closed-source D
1515

1616
### Fixed
1717
- [#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
18+
- [#417](https://github.com/plotly/dash-ag-grid/issues/417) fix grid rendering when `getRowId` is explicitly set to `None`
1819

1920
## [35.2.0] - 2026-04-03
2021
### Added

src/lib/fragments/AgGrid.react.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1587,6 +1587,9 @@ export function DashAgGrid(props) {
15871587
const convertedProps = convertAllProps(
15881588
omit(NO_CONVERT_PROPS, {...dashGridOptions, ...restProps})
15891589
);
1590+
if (convertedProps.getRowId === null) {
1591+
delete convertedProps.getRowId;
1592+
}
15901593

15911594
if ('theme' in convertedProps) {
15921595
if (typeof convertedProps.theme === 'function') {

tests/test_get_row_id.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import dash_ag_grid as dag
2+
from dash import Dash
3+
from . import utils
4+
5+
6+
def test_get_row_id_none_renders(dash_duo):
7+
app = Dash(__name__)
8+
app.layout = [
9+
dag.AgGrid(
10+
id="grid",
11+
rowData=[{"test": 1}],
12+
columnDefs=[{"field": "test"}],
13+
getRowId=None,
14+
)
15+
]
16+
17+
dash_duo.start_server(app)
18+
grid = utils.Grid(dash_duo, "grid")
19+
grid.wait_for_cell_text(0, 0, "1")

0 commit comments

Comments
 (0)