improve Table API with regards to Sorting

Đang mở
#302 1 bình luận 0 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
Tái cấu trúc
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Ít trao đổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Start by reading the Table component API and its sorting implementation, then find the tests that cover sortable columns. Remove columns.isSortable and add sort.sortableColumns as an array of column names; update the API tests to verify sorting uses those names and that columns, rows, and sort configuration stay aligned.

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

Mô tả

Presently it is possible to express in Table component API invalid configuration.

It is valid to set columns.isSortable = true and not provide the sort object. We could validate this via a custom Prop validation function, but I think it more elegant to:

  • remove the columns.isSortable param
  • add new sort.sortableColumns param holding an array of column names

With this change the user only has to ensure that the column names within params columns, rows, and sort match.

Ngôn ngữ chính
TypeScript
Star
23
Fork
10
Merge trung bình
5 ngày 12 giờ
Pull request đã merge (30 ngày)
9

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

Mở trong Codespaces

Khởi chạy dev container của dự án ngay trên trình duyệt, bằng tài khoản GitHub của bạn.

  • Không có Dockerfile hay tệp Docker Compose
  • Không có mẫu pull request
  • Không có hướng dẫn đóng góp

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 react-ui-org/react-ui

Tất cả issue của react-ui-org/react-ui

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.