useVirtualizer not working in Vue Test Utils
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
Hướng nghiên cứu
Bắt đầu với component ví dụ Vue dựa trên RowVirtualizerFixed.vue và bản tái hiện RowVirtualizerFixed.test.ts được mô tả trong issue. Chạy test Vitest và kiểm tra wrapper.html cùng với output được render của virtualizer. Được xem là hoàn tất khi môi trường test render các hàng được virtualize trong HTML của wrapper, khớp với hành vi của ứng dụng.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
The virtualizer doesn't seem to work when used in Vue Test Utils.
Your minimal, reproducible example
Steps to reproduce
-
Create a new vite app with vue + ts template
npm create vite@latest -
Install vitest and vue test utils
npm i vitest
npm i @vue/test-utils -
Create a new component based on any vue tanstack virtual example, I tried with: -> RowVirtualizerFixed.vue in fixed example
-
Create a new basic test file RowVirtualizerFixed.test.ts and log the wrapper's html:
import { mount } from '@vue/test-utils'
import { describe, it } from 'vitest'
import VirtualRowsExample from './VirtualRowsExample.vue'
describe('VirtualRowsExample', () => {
it('should render virtualized rows', () => {
const wrapper = mount(VirtualRowsExample)
console.log(wrapper.html())
})
})
- Run the tests
- As you will see the wrapper won't print any html where the rows should be visible
Looks like rowVirtualizer.value.getVirtualItems is not returning any row
<div class="List" style="height: 200px; width: 400px; overflow: auto;">
<div style="height: 350000px; width: 100%; position: relative;"></div>
</div>
The component looks fine when used in the app
Expected behavior
Some Rows should be printed in wrapper's html
How often does this bug happen?
Every time
Screenshots or Videos
No response
Platform
Windows
tanstack-virtual version
3.0.4
TypeScript version
4.9.3
Additional context
No response
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- Ngôn ngữ chính
- TypeScript
- Star
- 7.2k
- Fork
- 495
- Merge trung bình
- 15 giờ 11 phút
- Pull request đã merge (30 ngày)
- 17
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/virtual
-
Document the indexAttribute option and cover it with a testCó thể đã có người làm @officialasishkumar đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
Maintainer thường phản hồi trong vòng 1 ngày
-
With `useScrollendEvent`, scrollToIndex and scrollToEnd stop short when the target moves while they settleCó thể đã có người làm @Darkatse đã nhận 11 ngày trước. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
svelte-virtual renders no rows when the scroll element is bound after the store subscribesCó thể đã có người làm @clean99 đã nhận 15 ngày trước. Đang mở
Độ khó 4/5 1-2 ngày Mức phù hợp với người mới 35/100
Maintainer thường phản hồi trong vòng 1 ngày
-
anchorTo: 'end' does not keep the reading position when only paddingStart changesCó thể đã có người làm @duongynhi000001-crypto đã nhận 15 ngày trước. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 30/100
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của TanStack/virtual
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
fb55/htmlparser2#2579 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug good first issue needs-review
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 83/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Add Module DB RulesĐang mởdocumentation public
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 68/100
midnightntwrk/umbradb#65 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
area/channels kind/bug priority/medium
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
nanocoai/nanoclaw#4501 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Docker images: plain X.Y.Z tag (e.g. 7.2.3) is never updated after the initial release buildĐang mởneeds verification
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
Maintainer thường phản hồi trong vòng 13 ngày