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

Hide Navigation items based on hidden props #4607

Open
AGM-90 opened this issue Jan 16, 2025 · 3 comments
Open

Hide Navigation items based on hidden props #4607

AGM-90 opened this issue Jan 16, 2025 · 3 comments
Labels
enhancement This is not a bug, nor a new feature scope: toolpad-core Abbreviated to "core"

Comments

@AGM-90
Copy link

AGM-90 commented Jan 16, 2025

Summary

In dashboards, we might display different sidebar items based on user roles, so a hidden prop would be useful.

Examples

No response

Motivation

No response

Search keywords: navigation

@AGM-90 AGM-90 added the status: waiting for maintainer These issues haven't been looked at yet by a maintainer label Jan 16, 2025
@apedroferreira
Copy link
Member

We could solve this with the upcoming renderItem property in navigation items by passing it something like renderItem: () => null or we could add a specific property like visible: false.
Other than that this should be an easy feature to add and it seems pretty useful!

@apedroferreira apedroferreira added component: layout This is the name of the generic UI component, not the React module! scope: toolpad-core Abbreviated to "core" enhancement This is not a bug, nor a new feature and removed status: waiting for maintainer These issues haven't been looked at yet by a maintainer component: layout This is the name of the generic UI component, not the React module! labels Jan 16, 2025
@Janpot
Copy link
Member

Janpot commented Jan 16, 2025

Wouldn't it be already possible to supply different structures to the navigation prop in the AppProvider based on the current role?

@AGM-90
Copy link
Author

AGM-90 commented Jan 17, 2025

Wouldn't it be already possible to supply different structures to the navigation prop in the AppProvider based on the current role?

Same sub structure will repeat in different structures

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement This is not a bug, nor a new feature scope: toolpad-core Abbreviated to "core"
Projects
Status: Backlog
Development

No branches or pull requests

3 participants