@@ -92,9 +92,16 @@ const propTypes = {
92
92
}
93
93
return null ;
94
94
} ,
95
- /** The number of nearest neighbors of the currently selected page that are shown in the numbres list. */
95
+ /** The number of nearest neighbors of the currently selected page that are shown in the numbers list. */
96
96
delta : PropTypes . number ,
97
97
children : PropTypes . node ,
98
+ /** Optional The options available in the rows per page selector drop down */
99
+ rowsPerPageOptions : PropTypes . arrayOf (
100
+ PropTypes . shape ( {
101
+ value : PropTypes . number ,
102
+ label : PropTypes . string ,
103
+ } ) ,
104
+ ) ,
98
105
} ;
99
106
100
107
const defaultProps = {
@@ -109,13 +116,13 @@ const defaultProps = {
109
116
updatePage : ( ) => { } ,
110
117
delta : 1 ,
111
118
children : undefined ,
119
+ rowsPerPageOptions : [
120
+ { value : 5 , label : '5' } ,
121
+ { value : 10 , label : '10' } ,
122
+ { value : 25 , label : '25' } ,
123
+ { value : 50 , label : '50' } ,
124
+ ] ,
112
125
} ;
113
- const rowsPerPageDefaultOptions = [
114
- { value : 5 , label : '5' } ,
115
- { value : 10 , label : '10' } ,
116
- { value : 25 , label : '25' } ,
117
- { value : 50 , label : '50' } ,
118
- ] ;
119
126
120
127
function TableFooter ( {
121
128
children,
@@ -129,6 +136,7 @@ function TableFooter({
129
136
pageCount,
130
137
updatePage,
131
138
delta,
139
+ rowsPerPageOptions,
132
140
} ) {
133
141
return (
134
142
< div className = "dg-table-footer-container" >
@@ -158,7 +166,7 @@ function TableFooter({
158
166
</ Text >
159
167
< ButtonSelect
160
168
className = "dg-table-footer-rows-per-page-select"
161
- options = { rowsPerPageDefaultOptions }
169
+ options = { rowsPerPageOptions }
162
170
value = { rowsPerPageValue }
163
171
type = "secondary"
164
172
onChange = { onRowPerPageSelect }
0 commit comments