DataTable: PassThrough types does not match actual values
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
- 48/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend
Hướng nghiên cứu
Bắt đầu từ các kiểu passthrough của DataTable được expose thông qua PrimeReactPTOptions và lần theo entry point bodyRow(options). So sánh kiểu context được khai báo với DataTableBodyRowContext được mô tả trong issue, sau đó xác minh rằng context của bodyRow được định kiểu nhất quán thay vì là DataTableContext hoặc any.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Describe the bug
When styling with Tailwind through theming, it is needed to type the passthrough options like so -> datatablePT: Pick<PrimeReactPTOptions, "datatable">
When trying to access the context for a bodyRow in passthrough options for DataTable the type for context is DataTableContext and not DataTableBodyRowContext.
bodyRow({ context }) -> context is type any
bodyRow(options) => options?.context is type DataTableContext
Reproducer
No response
System Information
System:
OS: Windows 11 10.0.22631
CPU: (12) x64 Intel(R) Core(TM) i7-10850H CPU @ 2.70GHz
Memory: 18.29 GB / 31.85 GB
Binaries:
Node: 22.15.1 - C:\Program Files\nodejs\node.EXE
Yarn: 4.9.2 - C:\Program Files\nodejs\yarn.CMD
npm: 10.9.2 - C:\Program Files\nodejs\npm.CMD
Browsers:
Chrome: 143.0.7499.41
Edge: Chromium (140.0.3485.54)
Firefox: 122.0 - C:\Program Files\Mozilla Firefox\firefox.exe
Internet Explorer: 11.0.22621.3527
npmPackages:
primereact: ^10.9.7 => 10.9.7
react: ^19.1.1 => 19.1.1
tailwindcss: ^4.1.13 => 4.1.13
Steps to reproduce the behavior
- Create a passthrough styling object for the
DataTablecomponent, used for theming and not directly on the component. - Add the type for the
DataTablecomponent fromimport type { PrimeReactPTOptions } from "primereact/api" - Type the passthrough styling object like
Pick<PrimeReactPTOptions, "datatable"> - Create styling for bodyRow
bodyRow(options) - Check that the
options.contextexists and that the type is wrong ->DataTableContext
Expected behavior
I would expect that the type for context in bodyRow is DataTableBodyRowContext and not the parent context type.
- Ngôn ngữ chính
- CSS
- Star
- 8.3k
- Fork
- 1.2k
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
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 primefaces/primereact
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
primefaces/primereact#8552 ·
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 88/100
primefaces/primereact#8550 ·
-
Row checkbox selection tick is invisible in Landing Page Theme sectionCó thể đã có người làm @Prakash1185 đã nhận 150 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
primefaces/primereact#8545 ·
-
Dependency conflict between jspdf v4 and jspdf-autotable during npm installCó thể đã có người làm @Kamran92 đã nhận 164 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
primefaces/primereact#8537 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 58/100
primefaces/primereact#8551 ·
Tất cả issue của primefaces/primereact
Issue tương tự
-
ai-driven-fuzzing bug claude Minor
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
linagora/cozy-client#1763 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Fix og:url and og:image tagsĐang mở
Độ khó 1/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 2 ngày
-
area:desktop area:ui bug platform:macos
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 67/100
anthropics/claude-code#106183 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
Maintainer thường phản hồi trong vòng 2 ngày
-
CMS video element: "CmsVideoPlugin" sets `volume = 0`, so videos cannot be unmuted on Android ChromeĐang mởneeds-triage Platform(Default)
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
Maintainer thường phản hồi trong vòng 1 ngày