-
Notifications
You must be signed in to change notification settings - Fork 820
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
NavDrawer
is too restrictive about its child element
#2773
Labels
Comments
The best way to better support this functionality will be to have |
Not that I need to tell @myasonik, but EuiCollapsibleNav is the recommended component and we've deprecated EuiNavDrawer. Closing this as no new features will be considered |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Summary
NavDrawer
only allows a specific whitelist of children (not sure exactly what it is) primarily:< />
andNavDrawerGroup
.This makes it difficult to break up large navs because you can't wrap parts of it in a component even if that component returns a
NavDrawerGroup
.One workaround is to call the component as a function instead of trying to render it as a component. Other than looking hacky and being difficult to debug, I'm not sure if there are any other React-related side effects to doing that.
Pseudo-example
Given a component:
This works:
While this does not:
The text was updated successfully, but these errors were encountered: