diff --git a/src/DataGrid.tsx b/src/DataGrid.tsx index 27411bee11..5eb99d289d 100644 --- a/src/DataGrid.tsx +++ b/src/DataGrid.tsx @@ -204,7 +204,8 @@ export interface DataGridProps extends Sha rowClass?: Maybe<(row: NoInfer, rowIdx: number) => Maybe>; /** @default 'ltr' */ direction?: Maybe; - [data: `data-${string}`]: unknown; + 'data-testid'?: Maybe; + 'data-cy'?: Maybe; } /** @@ -264,7 +265,8 @@ function DataGrid( 'aria-description': ariaDescription, 'aria-describedby': ariaDescribedBy, 'aria-rowcount': rawAriaRowCount, - ...dataProps + 'data-testid': testId, + 'data-cy': dataCy } = props; /** @@ -1080,7 +1082,6 @@ function DataGrid( return ( // biome-ignore lint/a11y/useValidAriaProps: aria-description is a valid prop
( ref={gridRef} onScroll={handleScroll} onKeyDown={handleKeyDown} + data-testid={testId} + data-cy={dataCy} >