Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Leaf rows are not calculated correctly

Đang mở
#6,573 4 bình luận 2 reaction 0 người được giao Xem trên GitHub

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
55/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu với CodeSandbox được liên kết và tái hiện trường hợp header lồng nhau, sau đó theo dõi cách các leaf header được tính trong mã của bảng. Xác nhận liệu các header có subheader có được đưa vào một cách có chủ đích hay không; công việc được xem là hoàn tất khi phép tính được sửa và hành vi được bao phủ bằng một regression test, hoặc khi định nghĩa dự kiến của một leaf header được ghi lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

TanStack Table version

v8.19.3

Framework/Library version

v.18.0.4

Describe the bug and the steps to reproduce it

Bug exists also in the newest version.
Leaf headers include headers which contain subheaders - it seems inconsistent with a definition of a leaf node.
Quoting https://en.wikipedia.org/wiki/Tree_(graph_theory):

[...] an external vertex (or outer vertex, terminal vertex or leaf) is a vertex of degree 1.

Which means one edge connected. With that logic, only headers with no subheaders should be treated as leaf headers - the only exception is the root header with one subheader.
If this is a design choice, not a feature, I think an understanding of a leaf should be included in the docs, as it is at least confusing.

I'm not opening a PR because I'm not sure if I'm not missing something, but if it turns out to be an issue I'm happy to fix it.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

https://codesandbox.io/p/sandbox/h684m4

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Yes, I think I know how to fix it and will discuss it in the comments of this issue

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
28.5k
Fork
3.6k
Merge trung bình
2 ngày 3 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. 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.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TanStack/table

Tất cả issue của TanStack/table

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.