File tree 2 files changed +11
-3
lines changed
packages/virtual-core/src
2 files changed +11
-3
lines changed Original file line number Diff line number Diff line change @@ -286,6 +286,14 @@ type getVirtualItems = () => VirtualItem[]
286
286
287
287
Returns the virtual items for the current state of the virtualizer.
288
288
289
+ ### ` getVirtualIndexes `
290
+
291
+ ` ` ` tsx
292
+ type getVirtualIndexes = () => number []
293
+ ` ` `
294
+
295
+ Returns the virtual row indexes for the current state of the virtualizer.
296
+
289
297
### ` scrollToOffset `
290
298
291
299
` ` ` tsx
Original file line number Diff line number Diff line change @@ -696,7 +696,7 @@ export class Virtualizer<
696
696
} ,
697
697
)
698
698
699
- private getIndexes = memo (
699
+ getVirtualIndexes = memo (
700
700
( ) => {
701
701
let startIndex : number | null = null
702
702
let endIndex : number | null = null
@@ -724,7 +724,7 @@ export class Virtualizer<
724
724
} )
725
725
} ,
726
726
{
727
- key : process . env . NODE_ENV !== 'production' && 'getIndexes ' ,
727
+ key : process . env . NODE_ENV !== 'production' && 'getVirtualIndexes ' ,
728
728
debug : ( ) => this . options . debug ,
729
729
} ,
730
730
)
@@ -814,7 +814,7 @@ export class Virtualizer<
814
814
}
815
815
816
816
getVirtualItems = memo (
817
- ( ) => [ this . getIndexes ( ) , this . getMeasurements ( ) ] ,
817
+ ( ) => [ this . getVirtualIndexes ( ) , this . getMeasurements ( ) ] ,
818
818
( indexes , measurements ) => {
819
819
const virtualItems : Array < VirtualItem > = [ ]
820
820
You can’t perform that action at this time.
0 commit comments