Skip to content

Commit

Permalink
Fix build
Browse files Browse the repository at this point in the history
  • Loading branch information
arminmeh committed Jul 11, 2024
1 parent 1db16b4 commit f3346cf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ export function skipFiltering(rowTree: GridRowTreeConfig) {
for (let i = 0; i < nodes.length; i += 1) {
const node: any = nodes[i];
filteredRowsLookup[node.id] = true;
filteredChildrenCountLookup[node.id] = node.serverChildrenCount;
filteredChildrenCountLookup[node.id] =
node.serverChildrenCount !== undefined ? node.serverChildrenCount : -1;
}

return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ interface InsertDataRowInTreeParams {
onDuplicatePath?: GridTreePathDuplicateHandler;
isGroupExpandedByDefault?: DataGridProProps['isGroupExpandedByDefault'];
defaultGroupingExpansionDepth: number;
serverChildrenCount: number;
serverChildrenCount?: number;
groupsToFetch?: Set<GridRowId>;
}

Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid-pro/src/utils/tree/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export interface RowTreeBuilderGroupingCriterion {
export interface RowTreeBuilderNode {
id: GridRowId;
path: RowTreeBuilderGroupingCriterion[];
serverChildrenCount: number;
serverChildrenCount?: number;
}

/**
Expand Down
2 changes: 1 addition & 1 deletion packages/x-data-grid/src/models/gridRows.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ export interface GridDataSourceGroupNode extends GridDataGroupNode {
/**
* Number of children this node has on the server. Returns `-1` if unknown.
*/
serverChildrenCount: number;
serverChildrenCount?: number;
/**
* The cached path to be passed on as `groupKey` to the server.
*/
Expand Down

0 comments on commit f3346cf

Please sign in to comment.