forked from CITKParus/P8-Panels
WEB APP: P8PTable - исправлена ошибка вёрстки сообщения об отсутствии данных
This commit is contained in:
parent
a494706be5
commit
3883e485dd
@ -798,8 +798,8 @@ const P8PTable = ({
|
||||
))}
|
||||
</TableHead>
|
||||
<TableBody>
|
||||
{rows.length > 0
|
||||
? (Array.isArray(groups) && groups.length > 0 ? groups : [{}]).map((group, g) => {
|
||||
{rows.length > 0 ? (
|
||||
(Array.isArray(groups) && groups.length > 0 ? groups : [{}]).map((group, g) => {
|
||||
const rowsView = rows.map((row, i) =>
|
||||
!group?.name || group?.name == row.groupName ? (
|
||||
<React.Fragment key={`data-${i}`}>
|
||||
@ -826,9 +826,7 @@ const P8PTable = ({
|
||||
key={`data-cell-${j}`}
|
||||
align={getAlignByDataType(columnDef)}
|
||||
sx={{
|
||||
...(columnDef.width
|
||||
? { minWidth: columnDef.width, maxWidth: columnDef.width }
|
||||
: {}),
|
||||
...(columnDef.width ? { minWidth: columnDef.width, maxWidth: columnDef.width } : {}),
|
||||
...(columnDef.fixed ? STYLES.TABLE_CELL_STICKY(theme, columnDef.fixedLeft) : {}),
|
||||
...customRender.cellStyle
|
||||
}}
|
||||
@ -850,9 +848,7 @@ const P8PTable = ({
|
||||
...STYLES.TABLE_CELL_EXPAND_CONTAINER,
|
||||
...(fixedColumns ? STYLES.TABLE_CELL_STICKY(theme, 0) : {})
|
||||
}}
|
||||
colSpan={
|
||||
fixedColumns ? header.displayFixedColumnsCount + 1 : header.displayDataColumnsCount
|
||||
}
|
||||
colSpan={fixedColumns ? header.displayFixedColumnsCount + 1 : header.displayDataColumnsCount}
|
||||
>
|
||||
{rowExpandRender({ columnsDef, row })}
|
||||
</TableCell>
|
||||
@ -870,15 +866,17 @@ const P8PTable = ({
|
||||
</React.Fragment>
|
||||
);
|
||||
})
|
||||
: null}
|
||||
) : noDataFoundText && !reloading ? (
|
||||
<TableRow>
|
||||
<TableCell colSpan={header.displayDataColumnsCount}>
|
||||
<P8PAppInlineError text={noDataFoundText} />
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
) : null}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</TableContainer>
|
||||
{rows.length == 0 ? (
|
||||
noDataFoundText && !reloading ? (
|
||||
<P8PAppInlineError text={noDataFoundText} />
|
||||
) : null
|
||||
) : morePages ? (
|
||||
{morePages ? (
|
||||
<Container style={STYLES.MORE_BUTTON_CONTAINER}>
|
||||
<Button fullWidth onClick={handleMorePagesBtnClick}>
|
||||
{morePagesBtnCaption}
|
||||
|
Loading…
x
Reference in New Issue
Block a user