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

Pass false in UserMenu prop in AppBar component #5419

Closed
mariaefi29 opened this issue Oct 19, 2020 · 4 comments · Fixed by #5421
Closed

Pass false in UserMenu prop in AppBar component #5419

mariaefi29 opened this issue Oct 19, 2020 · 4 comments · Fixed by #5421

Comments

@mariaefi29
Copy link

mariaefi29 commented Oct 19, 2020

Is your feature request related to a problem? Please describe.

Sometimes applications are not required to have any users.

For that purpose I think it would be a great idea to pass userMenu={false} as a prop in a custom AppBar component.

Describe the solution you'd like

It would be great to be able to create your own custom AppBar component very easy like this:

const MyAppBar = props => <AppBar {...props} userMenu={false} />;

Describe alternatives you've considered

Now there is an error if your are trying to pass false, because userMenu requires JSX.Element:

userMenu?: JSX.Element;

There is a workaround to pass icon={false} in a custom UserMenu component and you will not see the icon of the profile page.

const MyUserMenu = props => <UserMenu {...props} icon={false} />;

const MyAppBar = props => <AppBar {...props} userMenu={<MyUserMenu />} />;

However, the component is still there and clickable:

image

Are there any other alternatives that I probably haven't found?

@mariaefi29 mariaefi29 changed the title Pass false in userMenue prop in AppBar component Pass false in userMenue prop in AppBar component Oct 19, 2020
@Luwangel Luwangel changed the title Pass false in userMenue prop in AppBar component Pass false in UserMenu prop in AppBar component Oct 19, 2020
@fzaninotto fzaninotto linked a pull request Oct 22, 2020 that will close this issue
2 tasks
@fzaninotto
Copy link
Member

Fixed by #5421

@mariaefi29
Copy link
Author

mariaefi29 commented Nov 3, 2020

Dear @fzaninotto,

Could you please provide some informations when this fix will be released?)

Thank you!

PS. I didn't find in 3.9.5 and 3.9.6 releases(

@djhi
Copy link
Contributor

djhi commented Nov 3, 2020

Hi @mariaefi29, as it has been merged on the next branch, it will be released in 3.10.0. As for the date of the release, we can't really say. Should be in a few weeks.

@mariaefi29
Copy link
Author

@djhi Thank you very much for your reply! I'll keep waiting then for 3.10.0 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants