@@ -273,7 +273,7 @@ const setPaging = (settings, start, perPage) => ({
273
273
const computePagination = ( settings ) => ( {
274
274
page : settings . current ,
275
275
perPage : settings . perpage ,
276
- perPageOptions : [ 10 , 20 , 50 , 100 , 200 , 500 , 1000 ] ,
276
+ perPageOptions : [ 5 , 10 , 20 , 50 , 100 , 200 , 500 , 1000 ] ,
277
277
} ) ;
278
278
279
279
const GtlView = ( {
@@ -292,6 +292,9 @@ const GtlView = ({
292
292
noFlashDiv,
293
293
} ) => {
294
294
// const { settings, data } = props;
295
+ if ( pages && pages . perpage ) {
296
+ initialState . settings . perpage = pages . perpage ;
297
+ }
295
298
const initState = {
296
299
...initialState ,
297
300
additionalOptions,
@@ -387,7 +390,7 @@ const GtlView = ({
387
390
isExplorer ,
388
391
setPaging ( settings , 0 , perPage ) ,
389
392
records ,
390
- additionalOptions ,
393
+ additionalOptions
391
394
) ;
392
395
393
396
/** Function execution when a page or perPage is changed in carbon pagination events. */
@@ -528,7 +531,9 @@ GtlView.propTypes = {
528
531
records : PropTypes . arrayOf ( PropTypes . any ) , // fixme
529
532
hideSelect : PropTypes . bool ,
530
533
showUrl : PropTypes . oneOfType ( [ PropTypes . string , PropTypes . bool ] ) ,
531
- pages : PropTypes . shape ( { } ) , // fixme
534
+ pages : PropTypes . shape ( {
535
+ list : PropTypes . number , reports : PropTypes . number , grid : PropTypes . number , tile : PropTypes . number ,
536
+ } ) ,
532
537
isAscending : PropTypes . bool ,
533
538
} ;
534
539
0 commit comments