Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PageContainer] Make PageContainer customizable for dynamic routes #4114

Merged
merged 15 commits into from
Sep 20, 2024

Conversation

Janpot
Copy link
Member

@Janpot Janpot commented Sep 18, 2024

Closes #4100

Adds a title and breadCrumbs override. Also supplies a useActivePage to retrieve the current value for title and breadCrumbs so they can be extended.

https://deploy-preview-4114--mui-toolpad-docs.netlify.app/toolpad/core/react-page-container/#dynamic-routes

@Janpot Janpot added the new feature New feature or request label Sep 18, 2024
@Janpot Janpot changed the title [PageContainer] Make PageContainer customizable [PageContainer] Make PageContainer customizable for dynamic routes Sep 19, 2024
@Janpot Janpot marked this pull request as ready for review September 19, 2024 13:55
@Janpot Janpot requested a review from a team September 19, 2024 13:55
Copy link
Member

@bharatkashyap bharatkashyap left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great feature addition! Intuitive to use for the most part.

I think we could benefit greatly from a code snippet or demo showcasing how useActivePage could be used in a Next.js app with the next/navigation primitives. Does it make sense to add one on this page itself, or a separate page to document useActivePage?

@Janpot
Copy link
Member Author

Janpot commented Sep 20, 2024

Added a snippet to the docs on how this would integrate with the next.js app router

@Janpot Janpot merged commit df8c4b7 into mui:master Sep 20, 2024
13 checks passed
@Janpot Janpot deleted the page-container-fix branch September 20, 2024 07:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PageContainer's title and breadcrumbs don't take the navigation segment into account
2 participants