File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,9 @@ function Pagination({
9595} : PaginationProps ) : JSX . Element {
9696 const windowSize = useWindowSize ( ) ;
9797 const isRTL = useRTL ( direction ) ;
98- const shouldShow = windowSize . width && windowSize . width > SMALL ;
98+ const { minWindowWidth = SMALL } = paginationComponentOptions ;
99+ const windowWidth = windowSize . width ;
100+ const shouldShow = ! minWindowWidth || ( windowWidth && windowWidth > minWindowWidth ) ;
99101 // const isRTL = detectRTL(direction);
100102 const numPages = getNumberOfPages ( rowCount , rowsPerPage ) ;
101103 const lastIndex = currentPage * rowsPerPage ;
Original file line number Diff line number Diff line change @@ -218,6 +218,10 @@ export interface TableStyles {
218218
219219export interface PaginationOptions {
220220 noRowsPerPage ?: boolean ;
221+ // If non-null, the "rows per page" dropdown will be hidden when the window width is less than
222+ // this value. SMALL == 599 is the default (if this property is undefined); pass `null` to always
223+ // show the dropdown (useful for ensuring SSR matches client).
224+ minWindowWidth ?: number | null ;
221225 rowsPerPageText ?: string ;
222226 rangeSeparatorText ?: string ;
223227 selectAllRowsItem ?: boolean ;
You can’t perform that action at this time.
0 commit comments