@@ -27,6 +27,7 @@ import {
27
27
Paper ,
28
28
Grid ,
29
29
Checkbox ,
30
+ Typography ,
30
31
} from "@material-ui/core" ;
31
32
import { createStyles , Theme , withStyles } from "@material-ui/core/styles" ;
32
33
import { TablePaginationActionsProps } from "@material-ui/core/TablePagination/TablePaginationActions" ;
@@ -103,6 +104,7 @@ const styles = (theme: Theme) =>
103
104
overflow : "auto" ,
104
105
flexDirection : "column" ,
105
106
padding : "19px 38px" ,
107
+ minHeight : "200px" ,
106
108
} ,
107
109
minTableHeader : {
108
110
color : "#393939" ,
@@ -148,6 +150,10 @@ const styles = (theme: Theme) =>
148
150
checkBoxRow : {
149
151
borderColor : borderColor ,
150
152
} ,
153
+ loadingBox : {
154
+ paddingTop : "100px" ,
155
+ paddingBottom : "100px" ,
156
+ } ,
151
157
} ) ;
152
158
153
159
// Function that renders Title Columns
@@ -226,7 +232,16 @@ const TableWrapper = ({
226
232
return (
227
233
< Grid item xs = { 12 } >
228
234
< Paper className = { classes . paper } >
229
- { isLoading && < LinearProgress /> }
235
+ { isLoading && (
236
+ < Grid container className = { classes . loadingBox } >
237
+ < Grid item xs = { 12 } style = { { textAlign : "center" } } >
238
+ < Typography component = "h3" > Loading...</ Typography >
239
+ </ Grid >
240
+ < Grid item xs = { 12 } >
241
+ < LinearProgress />
242
+ </ Grid >
243
+ </ Grid >
244
+ ) }
230
245
{ records && records . length > 0 ? (
231
246
< Table size = "small" stickyHeader = { stickyHeader } >
232
247
< TableHead className = { classes . minTableHeader } >
@@ -298,7 +313,9 @@ const TableWrapper = ({
298
313
</ TableBody >
299
314
</ Table >
300
315
) : (
301
- < div > { `There are no ${ entityName } yet.` } </ div >
316
+ < React . Fragment >
317
+ { ! isLoading && < div > { `There are no ${ entityName } yet.` } </ div > }
318
+ </ React . Fragment >
302
319
) }
303
320
</ Paper >
304
321
{ paginatorConfig && (
0 commit comments