forked from ddrilling/asb_cloud_front
Исправлено отображение строк в таблицах во вкладке Измерения
This commit is contained in:
parent
fbe86e23f6
commit
a41f5d4bf5
@ -10,45 +10,42 @@ 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 (
|
||||
<Fragment key={column.key}>
|
||||
<GridItem
|
||||
key={column.dataIndex}
|
||||
row={rowPosition}
|
||||
col={columnPosition}
|
||||
className={'measure-column-header'}
|
||||
>
|
||||
{column.title}
|
||||
</GridItem>
|
||||
{columns.map((cols, i) => {
|
||||
const columnPosition = 1 + i * 2
|
||||
return cols.map((column, j) => (
|
||||
<Fragment key={column.key}>
|
||||
<GridItem
|
||||
key={column.dataIndex}
|
||||
row={j + 1}
|
||||
col={columnPosition}
|
||||
className={'measure-column-header'}
|
||||
>
|
||||
{column.title}
|
||||
</GridItem>
|
||||
|
||||
<GridItem
|
||||
key={column.title}
|
||||
row={rowPosition}
|
||||
col={columnPosition + 1}
|
||||
className={'measure-column-value'}
|
||||
style={{ padding: 0 }}
|
||||
>
|
||||
{column.render ? (
|
||||
<Form.Item
|
||||
key={column.dataIndex}
|
||||
name={column.dataIndex}
|
||||
style={{ margin: 0 }}
|
||||
>
|
||||
{column.render(item[column.dataIndex])}
|
||||
</Form.Item>
|
||||
) : (
|
||||
<p key={column.title} className={'m-5px'}>
|
||||
{item[column.dataIndex]}
|
||||
</p>
|
||||
)}
|
||||
</GridItem>
|
||||
</Fragment>
|
||||
)})
|
||||
<GridItem
|
||||
key={column.title}
|
||||
row={j + 1}
|
||||
col={columnPosition + 1}
|
||||
className={'measure-column-value'}
|
||||
style={{ padding: 0 }}
|
||||
>
|
||||
{column.render ? (
|
||||
<Form.Item
|
||||
key={column.dataIndex}
|
||||
name={column.dataIndex}
|
||||
style={{ margin: 0 }}
|
||||
>
|
||||
{column.render(item[column.dataIndex])}
|
||||
</Form.Item>
|
||||
) : (
|
||||
<p key={column.title} className={'m-5px'}>
|
||||
{item[column.dataIndex]}
|
||||
</p>
|
||||
)}
|
||||
</GridItem>
|
||||
</Fragment>
|
||||
))
|
||||
}).flat()}
|
||||
</Grid>
|
||||
))
|
||||
|
Loading…
Reference in New Issue
Block a user