Skip to content

Commit 011c9b9

Browse files
ci: apply automated fixes
1 parent fdbd3ac commit 011c9b9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

.changeset/fix-lane-change-layout.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,22 @@ Fixed a critical bug where changing the number of lanes dynamically would cause
1010

1111
**Fix**: Skip `initialMeasurementsCache` restoration during lane transitions by checking the `lanesSettling` flag. This ensures all measurements are recalculated with correct lane assignments for the new lane count.
1212

13-
**Before**:
13+
**Before**:
14+
1415
```typescript
1516
// With lanes = 2
16-
virtualItems.forEach(item => {
17+
virtualItems.forEach((item) => {
1718
columns[item.lane].push(item) // ❌ Error: item.lane could be 3
1819
})
1920
```
2021

2122
**After**:
23+
2224
```typescript
2325
// With lanes = 2
24-
virtualItems.forEach(item => {
26+
virtualItems.forEach((item) => {
2527
columns[item.lane].push(item) // ✅ item.lane is always 0 or 1
2628
})
2729
```
2830

2931
This fix is essential for responsive masonry layouts where column count changes based on viewport width. No performance impact as it only affects the lane change transition path.
30-

0 commit comments

Comments
 (0)