@@ -231,12 +231,7 @@ class GridBody extends Component {
231231
232232 /**
233233 * Internal flag to adopt to store.add() passing an initial chunk.
234- * @member {Number} #initialChunkSize=0
235- */
236- #initialChunkSize = 0
237- /**
238- * Internal flag to adopt to store.add() passing an initial chunk.
239- * @member {Number} #initialChunkSize=0
234+ * @member {Number} #initialTotalSize=0
240235 */
241236 #initialTotalSize = 0
242237 /**
@@ -644,7 +639,7 @@ class GridBody extends Component {
644639 let me = this ,
645640 countRecords = me . store . count ,
646641 windowSize = me . availableRows + 2 * me . bufferRowRange ,
647- needed = Math . max ( 0 , Math . min ( windowSize , countRecords ) ) ,
642+ needed = Math . min ( windowSize , Math . max ( me . items . length , countRecords ) ) ,
648643 current = me . items . length ,
649644 delta = needed - current ,
650645 newRows = [ ] ,
@@ -746,14 +741,9 @@ class GridBody extends Component {
746741
747742 me . #lastMountedColumns = [ ...me . mountedColumns ] ;
748743
749- if ( me . #initialChunkSize > 0 ) {
750- endIndex = me . #initialChunkSize;
751- range = endIndex ;
752- } else {
753- // Creates the new start & end indexes
754- me . updateMountedAndVisibleRows ( ) ;
755- endIndex = mountedRows [ 1 ]
756- }
744+ // Creates the new start & end indexes
745+ me . updateMountedAndVisibleRows ( ) ;
746+ endIndex = mountedRows [ 1 ] ;
757747
758748 me . createRowPool ( ) ;
759749
@@ -797,7 +787,7 @@ class GridBody extends Component {
797787
798788 me . parent . isLoading = false ;
799789
800- me . updateScrollHeight ( true , range ) ; // silent
790+ me . updateScrollHeight ( true ) ; // silent
801791
802792 if ( me . isScrolling ) {
803793 Performance . markEnd ( 'grid.createViewData:' + me . id )
@@ -1094,14 +1084,10 @@ class GridBody extends Component {
10941084 * @returns {String }
10951085 */
10961086 getRowId ( rowIndex ) {
1097- let me = this ;
1087+ let me = this ,
1088+ poolSize = me . rowPoolSize ?? ( me . availableRows + 2 * me . bufferRowRange ) ;
10981089
1099- if ( me . #initialChunkSize > 0 ) {
1100- return `${ me . id } __row-${ rowIndex } `
1101- } else {
1102- let poolSize = me . rowPoolSize ?? ( me . availableRows + 2 * me . bufferRowRange ) ;
1103- return `${ me . id } __row-${ rowIndex % poolSize } `
1104- }
1090+ return `${ me . id } __row-${ rowIndex % poolSize } `
11051091 }
11061092
11071093 /**
@@ -1207,10 +1193,8 @@ class GridBody extends Component {
12071193 // If it's the first chunked load (data.total exists and data.items is a subset of total)
12081194 // Render the entire chunk for immediate scrollability
12091195 if ( total && items . length < total ) {
1210- me . #initialChunkSize = items . length ;
12111196 me . #initialTotalSize = total ;
12121197 me . createViewData ( ) ;
1213- me . #initialChunkSize = 0
12141198 me . #initialTotalSize = 0
12151199 } else {
12161200 me . createViewData ( )
0 commit comments