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

Nested resources with `TabbedForm` with `syncWithLocation` enabled

Đang mở
#9,211 4 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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
30/100
Loại issue
Tính năng
Độ 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 bằng cách đọc phần triển khai TabbedFormView, đặc biệt là xử lý route của syncWithLocation, và tái hiện kịch bản Resource lồng nhau trong issue. Được xem là hoàn thành khi một TabbedForm có thể sử dụng syncWithLocation, đồng thời việc điều hướng đến resource con lồng nhau vẫn có thể truy cập được thay vì bị route của tab bắt; issue không nêu tên file test.

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

Mô tả

RFC

Is your feature request related to a problem? Please describe.
I'd like to use nested resources with <TabbedForm> and syncWithLocation enabled. This is not possible due to TabbedFormView using splat route:

{syncWithLocation ? (
    <Routes>
        <Route path="/*" element={renderTabHeaders()} />
    </Routes>
) : (
    renderTabHeaders()
)}

The scenario is as follows: I have an edit page for a resource. It renders a TabbedForm. On this edit page I'd like to navigate to a nested resource that is declared similar to this:

<Resource name="parent" edit={EditView}>
  <Route path=":id/child" element={<ChildView />} />
</Resource>

function EditView() {
  return (
    <Edit>
      <TabbedForm>
        <FormTab label="tab1" />
      </TabbedForm>
    </Edit>
}

Describe the solution you'd like
I'd like to be able to use nested resources and TabbedForm on a source view. This will be possible if we add some kind of prefix before splat route:

{syncWithLocation ? (
    <Routes>
        <Route path="/tabs/*" element={renderTabHeaders()} />
    </Routes>
) : (
    renderTabHeaders()
)}

Describe alternatives you've considered
Probably, as a workaround I can navigate to an intermediary view that does not have a splat route, so it doesn't catch the child view route:

navigate("/parent");
navigate("/parent/123/child");

Additional context

Ngôn ngữ chính
TypeScript
Star
27k
Fork
5.5k
Merge trung bình
1 ngày 3 phút
Pull request đã merge (30 ngày)
32

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 marmelab/react-admin

Tất cả issue của marmelab/react-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.