Skip to content

Commit 2551615

Browse files
committed
conditional props in test
1 parent a64fc4b commit 2551615

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: src/TreeDataGrid.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export interface TreeDataGridProps<R, SR = unknown, K extends Key = Key>
3636
) => Record<string, readonly NoInfer<R>[]>;
3737
expandedGroupIds: ReadonlySet<unknown>;
3838
onExpandedGroupIdsChange: (expandedGroupIds: Set<unknown>) => void;
39-
generateGroupId: ((groupKey: string, parentId?: string) => string) | undefined;
39+
generateGroupId?: (groupKey: string, parentId?: string) => string;
4040
}
4141

4242
type GroupByDictionary<TRow> = Record<

Diff for: test/browser/TreeDataGrid.test.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ function TestGrid({ groupBy, generateGroupId }: TestGridProps) {
126126
onExpandedGroupIdsChange={setExpandedGroupIds}
127127
onRowsChange={setRows}
128128
onPaste={onPaste}
129-
generateGroupId={generateGroupId}
129+
{...(generateGroupId && { generateGroupId })}
130130
/>
131131
);
132132
}

0 commit comments

Comments
 (0)