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

ReferenceField not using custom data provider

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

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
42/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
api, frontend

Hướng nghiên cứu

Bắt đầu bằng cách theo dõi các lệnh gọi ReferenceField qua data provider Hydra và so sánh chúng với data provider tùy chỉnh được các trang show và edit sử dụng. Xác nhận liệu ReferenceField có kích hoạt cả hai provider hay không; được coi là hoàn tất khi các yêu cầu API của nó sử dụng provider tùy chỉnh và bao gồm các header xác thực, mà không có lệnh gọi trùng lặp không được xác thực.

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

Mô tả

Description
I've extended the Hydra data provider to add authenticatino headers.
My dataprovider adds auth headers to ALL api calls. I need to use supabase auth headers for the API authentication.
This works fine for all show/edit pages etc.

I'm expecting all components to use this data provider.

But when using ReferenceField in either show or create/edit pages, these custom headers are not passed to the calls.
After doing some debuggin with console.logs, it appears that this component does not even call the custom dataprovider, but the built in data provider. Therefore, all these components cause request errors because the API returns 401. The data does appear, so it seems to be doing multiple API calls. One with the custom data provider, and one without.

After checking with the ReactAdmin team, it turns out this is probably related to the default Hydra Data Provider.
Can this be checked?

Reference: https://github.com/marmelab/react-admin/issues/8883

Ngôn ngữ chính
TypeScript
Star
516
Fork
134
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Hướng dẫn đóng góp

Mở 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 api-platform/admin

Tất cả issue của api-platform/admin

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.