Skip to content

Commit

Permalink
conditional props in test
Browse files Browse the repository at this point in the history
  • Loading branch information
Luisgustavom1 committed Jun 4, 2024
1 parent c57c77a commit d3ea22e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/TreeDataGrid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export interface TreeDataGridProps<R, SR = unknown, K extends Key = Key>
) => Record<string, readonly NoInfer<R>[]>;
expandedGroupIds: ReadonlySet<unknown>;
onExpandedGroupIdsChange: (expandedGroupIds: Set<unknown>) => void;
generateGroupId: ((groupKey: string, parentId?: string) => string) | undefined;
generateGroupId?: (groupKey: string, parentId?: string) => string;
}

type GroupByDictionary<TRow> = Record<
Expand Down
2 changes: 1 addition & 1 deletion test/TreeDataGrid.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ function TestGrid({ groupBy, generateGroupId }: TestGridProps) {
onExpandedGroupIdsChange={setExpandedGroupIds}
onRowsChange={setRows}
onPaste={onPaste}
generateGroupId={generateGroupId}
{...(generateGroupId && { generateGroupId })}
/>
);
}
Expand Down

0 comments on commit d3ea22e

Please sign in to comment.