Skip to content

Commit a2cde5d

Browse files
committed
fix: code style
1 parent 7f1e2db commit a2cde5d

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

packages/virtual-core/src/index.ts

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -702,15 +702,20 @@ export class Virtualizer<
702702
)
703703

704704
calculateRange = memo(
705-
() => [this.getMeasurements(), this.getSize(), this.getScrollOffset(), this.options.lanes],
705+
() => [
706+
this.getMeasurements(),
707+
this.getSize(),
708+
this.getScrollOffset(),
709+
this.options.lanes,
710+
],
706711
(measurements, outerSize, scrollOffset, lanes) => {
707712
return (this.range =
708713
measurements.length > 0 && outerSize > 0
709714
? calculateRange({
710715
measurements,
711716
outerSize,
712717
scrollOffset,
713-
lanes
718+
lanes,
714719
})
715720
: null)
716721
},
@@ -1106,17 +1111,22 @@ function calculateRange({
11061111
measurements,
11071112
outerSize,
11081113
scrollOffset,
1109-
lanes
1114+
lanes,
11101115
}: {
11111116
measurements: Array<VirtualItem>
11121117
outerSize: number
1113-
scrollOffset: number,
1118+
scrollOffset: number
11141119
lanes: number
11151120
}) {
11161121
const lastIndex = measurements.length - 1
11171122
const getOffset = (index: number) => measurements[index]!.start
11181123

1119-
let startIndex = findNearestBinarySearch(0, lastIndex, getOffset, scrollOffset)
1124+
let startIndex = findNearestBinarySearch(
1125+
0,
1126+
lastIndex,
1127+
getOffset,
1128+
scrollOffset,
1129+
)
11201130
let endIndex = startIndex
11211131

11221132
while (

0 commit comments

Comments
 (0)