@@ -37,7 +37,7 @@ export interface PaginatedTableProps<T, F> {
3737 keepCache ?: boolean ;
3838}
3939
40- const DEFAULT_PAGINATION_LIMIT = 20 ;
40+ const DEFAULT_PAGINATION_LIMIT = 10 ;
4141
4242export const PaginatedTable = < T , F > ( {
4343 limit : chunkSize = DEFAULT_PAGINATION_LIMIT ,
@@ -142,7 +142,6 @@ export const PaginatedTable = <T, F>({
142142 const isActive = shouldRender || shouldFetch ;
143143
144144 if ( isActive ) {
145- // Render active chunk normally
146145 chunks . push (
147146 < TableChunk < T , F >
148147 key = { i }
@@ -164,26 +163,28 @@ export const PaginatedTable = <T, F>({
164163 keepCache = { keepCache }
165164 /> ,
166165 ) ;
166+ }
167+
168+ if ( shouldRender ) {
167169 i ++ ;
168170 } else {
169171 // Find consecutive inactive chunks and merge them
170172 const startIndex = i ;
171173 let totalHeight = 0 ;
172174
173- while (
174- i < chunkStates . length &&
175- ! chunkStates [ i ] . shouldRender &&
176- ! chunkStates [ i ] . shouldFetch
177- ) {
175+ while ( i < chunkStates . length && ! chunkStates [ i ] . shouldRender ) {
178176 const currentChunkSize =
179177 i === chunkStates . length - 1 ? lastChunkSize : chunkSize ;
180178 totalHeight += currentChunkSize * rowHeight ;
181179 i ++ ;
182180 }
183181
184- // Render merged empty tbody for consecutive inactive chunks
182+ // Render merged separator for consecutive inactive chunks
185183 chunks . push (
186- < tr style = { { height : `${ totalHeight } px` } } key = { `merged-${ startIndex } -${ i - 1 } ` } >
184+ < tr
185+ style = { { height : `${ totalHeight } px` } }
186+ key = { `separator-${ startIndex } -${ i - 1 } ` }
187+ >
187188 < td colSpan = { columns . length } style = { { padding : 0 , border : 'none' } } />
188189 </ tr > ,
189190 ) ;
0 commit comments