Skip to content

Commit 3063a2a

Browse files
committed
group row should not be made if serverChildrenCount is undefined
1 parent f3346cf commit 3063a2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/x-data-grid-pro/src/utils/tree/insertDataRowInTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ export const insertDataRowInTree = ({
9999
// We create a leaf node for the data row.
100100
if (existingNodeIdWithPartialPath == null) {
101101
let node: GridLeafNode | GridDataSourceGroupNode;
102-
if (serverChildrenCount !== 0) {
102+
if (serverChildrenCount !== undefined && serverChildrenCount !== 0) {
103103
node = {
104104
type: 'group',
105105
id,

0 commit comments

Comments
 (0)