mirror of
https://github.com/status-im/safe-react.git
synced 2025-01-31 11:55:21 +00:00
Assets list - Very long empty page (#2159)
Co-authored-by: Fernando <fernando.greco@gmail.com>
This commit is contained in:
parent
44a646e789
commit
b8de127c42
@ -36,7 +36,7 @@ const styles = {
|
||||
},
|
||||
}
|
||||
|
||||
const FIXED_HEIGHT = 49
|
||||
const FIXED_EMPTY_HEIGHT = 255
|
||||
|
||||
const backProps = {
|
||||
'aria-label': 'Previous Page',
|
||||
@ -101,8 +101,8 @@ class GnoTable extends React.Component<any, any> {
|
||||
}))
|
||||
}
|
||||
|
||||
getEmptyStyle = (emptyRows) => ({
|
||||
height: FIXED_HEIGHT * emptyRows,
|
||||
getEmptyStyle = () => ({
|
||||
height: `calc(100vh - ${FIXED_EMPTY_HEIGHT}px)`,
|
||||
borderTopRightRadius: sm,
|
||||
borderTopLeftRadius: sm,
|
||||
backgroundColor: 'white',
|
||||
@ -155,7 +155,6 @@ class GnoTable extends React.Component<any, any> {
|
||||
sortedData = sortedData.slice(page * displayRows, page * displayRows + displayRows)
|
||||
}
|
||||
|
||||
const emptyRows = displayRows - Math.min(displayRows, data.size - page * displayRows)
|
||||
const isEmpty = size === 0 && !disableLoadingOnEmptyTable
|
||||
|
||||
return (
|
||||
@ -167,7 +166,7 @@ class GnoTable extends React.Component<any, any> {
|
||||
</Table>
|
||||
)}
|
||||
{isEmpty && (
|
||||
<Row className={classes.loader} style={this.getEmptyStyle(emptyRows + 1)}>
|
||||
<Row className={classes.loader} style={this.getEmptyStyle()}>
|
||||
<Loader size="sm" />
|
||||
</Row>
|
||||
)}
|
||||
|
Loading…
x
Reference in New Issue
Block a user