Skip to content

Commit

Permalink
Create default column titles in component when title string is empty.
Browse files Browse the repository at this point in the history
  • Loading branch information
ziggabyte committed Nov 15, 2023
1 parent c649624 commit c3a9e11
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,13 @@ const MappingRow: FC<MappingRowProps> = ({
borderRadius={2}
padding={1}
>
<Typography>{column.title}</Typography>
<Typography>
{column.title
? column.title
: messages.configuration.mapping.defaultColumnHeader({
columnIndex: column.id,
})}
</Typography>
</Box>
</Box>
<Box alignItems="center" display="flex" width="50%">
Expand Down
7 changes: 1 addition & 6 deletions src/features/import/store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,7 @@ const importSlice = createSlice({
if (sheet.firstRowIsHeaders && cellValue !== null) {
column.title = cellValue as string;
} else {
column.title = 'Test ' + cellIndex + 1;
/* messages.configuration.mapping.defaultColumnHeader(
{
columnIndex: cellIndex + 1,
}
); */
column.title = '';
column.data.push(cellValue);
}
} else {
Expand Down

0 comments on commit c3a9e11

Please sign in to comment.