u
This commit is contained in:
@@ -458,7 +458,7 @@ class FillSpace extends Component {
|
|||||||
const total = totalCount != null ? Number(totalCount) : list.length;
|
const total = totalCount != null ? Number(totalCount) : list.length;
|
||||||
const rawUnfiltered = propUnfilteredTotal ?? unfilteredCount;
|
const rawUnfiltered = propUnfilteredTotal ?? unfilteredCount;
|
||||||
const unfilteredTotal = rawUnfiltered != null ? Number(rawUnfiltered) : null;
|
const unfilteredTotal = rawUnfiltered != null ? Number(rawUnfiltered) : null;
|
||||||
const fullTotal = unfilteredTotal != null ? unfilteredTotal : Math.max(this.maxSeenCount || 0, total);
|
const fullTotal = unfilteredTotal != null ? Math.max(unfilteredTotal, total) : Math.max(this.maxSeenCount || 0, total);
|
||||||
const needsPaginationContainer = fullTotal > pageSize;
|
const needsPaginationContainer = fullTotal > pageSize;
|
||||||
const showPaginationControls = total > pageSize;
|
const showPaginationControls = total > pageSize;
|
||||||
const pageCount = Math.max(1, Math.ceil(total / Math.max(1, pageSize)));
|
const pageCount = Math.max(1, Math.ceil(total / Math.max(1, pageSize)));
|
||||||
@@ -502,7 +502,6 @@ class FillSpace extends Component {
|
|||||||
sx={{ mb: 1, height: 44, overflow: 'hidden' }}
|
sx={{ mb: 1, height: 44, overflow: 'hidden' }}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
aria-hidden={!showPaginationControls || undefined}
|
|
||||||
sx={{
|
sx={{
|
||||||
display: 'flex',
|
display: 'flex',
|
||||||
justifyContent: 'space-between',
|
justifyContent: 'space-between',
|
||||||
@@ -511,8 +510,6 @@ class FillSpace extends Component {
|
|||||||
gap: 1,
|
gap: 1,
|
||||||
width: '100%',
|
width: '100%',
|
||||||
height: 44,
|
height: 44,
|
||||||
visibility: showPaginationControls ? 'visible' : 'hidden',
|
|
||||||
pointerEvents: showPaginationControls ? 'auto' : 'none',
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -521,8 +518,15 @@ class FillSpace extends Component {
|
|||||||
noWrap
|
noWrap
|
||||||
sx={{ flexShrink: 1, minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis' }}
|
sx={{ flexShrink: 1, minWidth: 0, overflow: 'hidden', textOverflow: 'ellipsis' }}
|
||||||
>
|
>
|
||||||
{total === 0 ? '0' : `${offset + 1}–${Math.min(offset + pageSize, total)}`} von{' '}
|
{total === 0
|
||||||
{total}
|
? (unfilteredTotal != null && unfilteredTotal > 0
|
||||||
|
? `0 von ${total} (${unfilteredTotal} gesamt)`
|
||||||
|
: '0')
|
||||||
|
: `${offset + 1}–${Math.min(offset + pageSize, total)} von ${total}${
|
||||||
|
unfilteredTotal != null && unfilteredTotal > total
|
||||||
|
? ` (${unfilteredTotal} gesamt)`
|
||||||
|
: ''
|
||||||
|
}`}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Pagination
|
<Pagination
|
||||||
count={pageCount}
|
count={pageCount}
|
||||||
@@ -543,6 +547,8 @@ class FillSpace extends Component {
|
|||||||
height: 44,
|
height: 44,
|
||||||
fontSize: '1rem',
|
fontSize: '1rem',
|
||||||
},
|
},
|
||||||
|
visibility: showPaginationControls ? 'visible' : 'hidden',
|
||||||
|
pointerEvents: showPaginationControls ? 'auto' : 'none',
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
Reference in New Issue
Block a user