Исправлено отображение строк в таблицах во вкладке Измерения

This commit is contained in:
ts_salikhov 2022-09-05 15:18:36 +04:00
parent fbe86e23f6
commit a41f5d4bf5

View File

@ -10,16 +10,13 @@ export const View = memo(({ columns, item }) => !item || !columns?.length ? (
<Empty key={'empty'} image={Empty.PRESENTED_IMAGE_SIMPLE} /> <Empty key={'empty'} image={Empty.PRESENTED_IMAGE_SIMPLE} />
) : ( ) : (
<Grid> <Grid>
{columns.map((cols, j) => { {columns.map((cols, i) => {
let rowPosition = 0 const columnPosition = 1 + i * 2
let columnPosition = 1 + j * 2 return cols.map((column, j) => (
return cols.map((column) => {
rowPosition++
return (
<Fragment key={column.key}> <Fragment key={column.key}>
<GridItem <GridItem
key={column.dataIndex} key={column.dataIndex}
row={rowPosition} row={j + 1}
col={columnPosition} col={columnPosition}
className={'measure-column-header'} className={'measure-column-header'}
> >
@ -28,7 +25,7 @@ export const View = memo(({ columns, item }) => !item || !columns?.length ? (
<GridItem <GridItem
key={column.title} key={column.title}
row={rowPosition} row={j + 1}
col={columnPosition + 1} col={columnPosition + 1}
className={'measure-column-value'} className={'measure-column-value'}
style={{ padding: 0 }} style={{ padding: 0 }}
@ -48,7 +45,7 @@ export const View = memo(({ columns, item }) => !item || !columns?.length ? (
)} )}
</GridItem> </GridItem>
</Fragment> </Fragment>
)}) ))
}).flat()} }).flat()}
</Grid> </Grid>
)) ))