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

[MenuItem] Add an anchorOrigin property for the nested items #6079

Merged
merged 3 commits into from
Feb 17, 2017
Merged

[MenuItem] Add an anchorOrigin property for the nested items #6079

merged 3 commits into from
Feb 17, 2017

Conversation

skylerfenn
Copy link

This gives similar functionality as animation prop to childMenuPopover.

@skylerfenn skylerfenn closed this Feb 7, 2017
@skylerfenn skylerfenn reopened this Feb 7, 2017
@muibot muibot added PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI and removed PR: Needs Review labels Feb 7, 2017
@oliviertassinari oliviertassinari removed the PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI label Feb 8, 2017
@jeffberry
Copy link

+1 we need this!

@oliviertassinari oliviertassinari added the component: menu This is the name of the generic UI component, not the React module! label Feb 12, 2017
@@ -59,6 +59,10 @@ class MenuItem extends Component {

static propTypes = {
/**
* Override the default anchorOrigin children used.
*/
anchorOrigin: PropTypes.object,
Copy link
Member

Choose a reason for hiding this comment

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

Please use the utils/propTypes.origin helper. You can have a look at the other components to see how it's done.

Copy link
Author

Choose a reason for hiding this comment

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

Done!

@@ -59,6 +59,10 @@ class MenuItem extends Component {

static propTypes = {
/**
* Override the default anchorOrigin children used.
Copy link
Member

Choose a reason for hiding this comment

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

We need to improve the wording. We should refer to the nested menu at least.
Here is what we have on the Popover:

    /**
     * This is the point on the anchor where the popover's
     * `targetOrigin` will attach to.
     * Options:
     * vertical: [top, center, bottom]
     * horizontal: [left, middle, right].
     */

Copy link
Author

Choose a reason for hiding this comment

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

Updated wording to:

Location of the anchor for the popover of nested `MenuItem` elements.

@oliviertassinari oliviertassinari added PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI and removed PR: Needs Review labels Feb 15, 2017
[MenuItem] Use util/propTypes origin helper for propType for anchorOrigin propType
@oliviertassinari oliviertassinari added PR: Review Accepted and removed PR: Needs Review PR: needs revision The pull request can't be merged. More details is available on the code review or fails in the CI labels Feb 16, 2017
@oliviertassinari oliviertassinari merged commit 8e02a68 into mui:master Feb 17, 2017
@oliviertassinari oliviertassinari changed the title [MenuItem] Allow MenuItem to have custom anchorOrigin [MenuItem] Add an anchorOrigin property for the nested items Feb 17, 2017
@oliviertassinari
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: menu This is the name of the generic UI component, not the React module!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants