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

[Docs] Provide example for 'Any other properties supplied will be spread to the root element.' #8088

Closed
Izhaki opened this issue Sep 7, 2017 · 1 comment
Assignees
Labels
docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process.

Comments

@Izhaki
Copy link
Contributor

Izhaki commented Sep 7, 2017

Any other properties supplied will be spread to the root element.

This sentence shows up quite a bit in the docs.

I think it is worth linking this sentence, wherever it occurs, to some example (the one below may be a good candidate).

What do you think? And where should it go? Happy to PR it.


It took me around 10 minutes to figure out how to disable the ripple effect on the default menu item.

As it turns out, MenuItem uses ListItem with the button set to true, and that button is considered the ListItem's 'root'. I had to look at the code for that.

So removing the ripple effect involved:

<MenuItem disableRipple onClick={ this.handleRequestClose }>Home</MenuItem>

Based on 'Any other properties supplied will be spread to the root element.', this works becaue of the root chain:

MenuItem > ListItem > Button

Which is rather genius, if you ask me.

@oliviertassinari
Copy link
Member

I do think that #7983 help. I agree, we could add a section about it in the API page of the documentation and link it.

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process. labels Sep 8, 2017
@oliviertassinari oliviertassinari self-assigned this Sep 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation good first issue Great for first contributions. Enable to learn the contribution process.
Projects
None yet
Development

No branches or pull requests

2 participants