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

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