Import - fixes (#13097)

- Fixes : https://github.com/twentyhq/twenty/issues/11623
- Design fix :
https://www.figma.com/design/xt8O9mFeLl46C5InWwoMrN/Twenty?node-id=61976-118483&t=z12YCJg7W7PFMcmg-4

After
<img width="600" alt="Screenshot 2025-07-08 at 11 52 26"
src="https://github.com/user-attachments/assets/744fd40b-bba1-4ed1-b44c-48766a20384d"
/>

Before
<img width="600" alt="Screenshot 2025-07-08 at 11 23 08"
src="https://github.com/user-attachments/assets/b5ef81a8-f4dc-4ba1-8741-b8edec579cc1"
/>

---------

Co-authored-by: Charles Bochet <charles@twenty.com>
This commit is contained in:
Etienne
2025-07-08 13:17:08 +02:00
committed by GitHub
parent 5306f9e0e5
commit ccf1d703bf
3 changed files with 39 additions and 20 deletions

View File

@ -107,10 +107,22 @@ const StyledDataGrid = styled(DataGrid)`
}
` as typeof DataGrid;
type SpreadsheetImportTableProps<Data> = DataGridProps<Data> & {
rowHeight?: number;
hiddenHeader?: boolean;
};
type SpreadsheetImportTableProps<Data> = Pick<
DataGridProps<Data>,
| 'selectedRows'
| 'onSelectedRowsChange'
| 'columns'
| 'headerRowHeight'
| 'rowKeyGetter'
| 'rows'
> &
Partial<
Pick<DataGridProps<Data>, 'onRowClick' | 'components' | 'onRowsChange'>
> & {
className?: string;
rowHeight?: number;
hiddenHeader?: boolean;
};
export const SpreadsheetImportTable = <Data,>({
className,
@ -119,8 +131,8 @@ export const SpreadsheetImportTable = <Data,>({
headerRowHeight,
rowKeyGetter,
rows,
onRowClick,
onRowsChange,
onRowClick,
onSelectedRowsChange,
selectedRows,
}: SpreadsheetImportTableProps<Data>) => {
@ -137,12 +149,12 @@ export const SpreadsheetImportTable = <Data,>({
{...{
className: `${className || ''} ${themeClassName}`,
columns,
components,
headerRowHeight,
rowKeyGetter,
rows,
onRowClick,
onRowsChange,
rows,
components,
onRowClick,
onSelectedRowsChange,
selectedRows,
}}