Title component usage does not override existing title
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
- 35/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 tại điểm vào của component Title trong react-admin và theo dõi cách nhiều component Title được render đóng góp vào tiêu đề tài liệu. Tái hiện ví dụ về parent và child có điều kiện, sau đó xác minh rằng Title được render gần đây nhất thay thế tiêu đề hiện có thay vì nối thêm vào đó.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Is your feature request related to a problem? Please describe.
I have a page that conditionally renders child components. The page uses react-admin's Title component to set a title. In most cases, when child component is rendered, Title should stay the same as in parent component; however, in some conditions, we want to be able to override page's title from within child.
Today, if both parent and child component have Title rendered, react-admin will just append Title2 to Title1 (will show Title1Title2)
function ParentComponent = (props) => {
const conditional = props.display? <ConditionalChild /> : null
return (
<Fragment>
<Title title="Title1">
Welcome to ParentComponent
{conditional}
</Fragment>
)
}
function ConditionalChild = () => {
const status = fetch_status()
if (status===0)
return (
<Fragment>
<Title title="Title2">
Status 0
</Fragment>
)
else
return (
<Fragment>
Other status
</Fragment>
)
}
Describe the solution you'd like
if a component or its children have multiple Title calls, the last call should win (similar to what react-helmet does while setting page title)
Describe alternatives you've considered
No clear solution found
Additional context
none
- 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
- 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 marmelab/react-admin
-
Blank page after logout when the app re-renders `<Admin>` during `authProvider.logout()`Có thể đã có người làm @fzaninotto đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
marmelab/react-admin#11431 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Pagination: page button aria-labels are not translated on small screensCó thể đã có người làm @Singmin đã nhận 4 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
marmelab/react-admin#11427 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add emptyText property to SelectArrayInputCó thể đã có người làm @kwitykwity đã nhận 62 ngày trước. Đang mởenhancement good first issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
marmelab/react-admin#10454 · 7 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 4/5 Hơn một tuần Mức phù hợp với người mới 38/100
marmelab/react-admin#11426 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
ra-data-graphql-simple: outdated graphql-ast-types-browser dependency causes npm peer warningsCó thể làm lại được @bipul724 đã nhận 15 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
marmelab/react-admin#11395 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của marmelab/react-admin
Issue tương tự
-
docker infra P1 security size:S
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
josephfung/curia#2408 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
ehmpathy/rhachet-roles-ehmpathy#1231 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement good first issue help wanted
Độ khó 2/5 Nửa ngày Mức phù hợp với người mới 70/100
danielw-sudo/agentuto#32 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
type:docs
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
nightgauge/nightgauge#2836 ·
Maintainer thường phản hồi trong vòng 1 ngày