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

DataView: text filters start on "is", so partial matches hide everything

Đang mở Phù hợp với người mới
#940 0 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 5 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
85/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
react, typescript
Lĩnh vực
frontend

Hướng nghiên cứu

Tìm component DataView và code xử lý filter của nó. Issue chỉ ra onAddFilter và FilterChip là những nơi mà toán tử mặc định được chọn từ filterOperators[filterType][0]. Đổi mặc định cho string filter từ 'is' sang 'contains', hoặc triển khai prop defaultFilterOperator. Kiểm tra bằng cách thêm một text filter và xác nhận các khớp một phần hiển thị chính xác.

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

Mô tả

When you add a text filter from the DataView filter menu, the chip always starts on the "is" operator. That means exact match.

Most people type part of a value into a text filter, like a first name. With "is" selected, that hides every row, and it looks like the filter is broken. You have to notice the operator and switch it to "contains" before it works.

Steps

  1. Have a DataView with a filterable string field, e.g. name.
  2. Add that filter from the menu.
  3. Type part of a name that's in the data.

Expected: matching rows show up.
Actual: no rows. Typing the full name works.

As far as I can tell, onAddFilter uses filterOperators[filterType][0], and FilterChip also starts its local state on operations[0]. So there's no way to change this from the outside.

A couple of ideas:

  • Start string filters on "contains" by default, or
  • Let a field set its starting operator, something like defaultFilterOperator: 'contains'. Both onAddFilter and the chip would need to respect it.
Ngôn ngữ chính
TypeScript
Star
69
Fork
13
Merge trung bình
4 ngày 4 giờ
Pull request đã merge (30 ngày)
27

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 raystack/apsara

Tất cả issue của raystack/apsara

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.