Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 7dbb35d298 | |||
| 108df323f9 | |||
| 2803bcd22c |
@@ -47,7 +47,8 @@ jobs:
|
||||
run: yarn test:unit
|
||||
|
||||
- name: Run Component Tests
|
||||
run: yarn test:component
|
||||
timeout-minutes: 5
|
||||
run: yarn test:component --reporter=verbose --logHeapUsage
|
||||
|
||||
publish:
|
||||
needs: build # Only runs if tests/lint pass
|
||||
|
||||
@@ -258,12 +258,13 @@ export function createVirtualizer<T>(
|
||||
// Calculate initial offset ONCE
|
||||
const getElementOffset = () => {
|
||||
const rect = node.getBoundingClientRect();
|
||||
return rect.top + window.scrollY;
|
||||
const scrollY = typeof window !== 'undefined' ? window.scrollY : 0;
|
||||
return rect.top + scrollY;
|
||||
};
|
||||
|
||||
let cachedOffsetTop = 0;
|
||||
let rafId: number | null = null;
|
||||
containerHeight = window.innerHeight;
|
||||
containerHeight = typeof window !== 'undefined' ? window.innerHeight : 0;
|
||||
|
||||
const handleScroll = () => {
|
||||
if (rafId !== null) {
|
||||
|
||||
@@ -12,6 +12,8 @@ export default defineConfig({
|
||||
restoreMocks: true,
|
||||
setupFiles: ['./vitest.setup.component.ts', './vitest.setup.jsdom.ts'],
|
||||
globals: true,
|
||||
testTimeout: 15000,
|
||||
maxWorkers: process.env.CI ? 1 : undefined,
|
||||
},
|
||||
|
||||
resolve: {
|
||||
|
||||
Reference in New Issue
Block a user