Skip to content

Allow 'object' propType in 'to' prop of 'MenuItemLink' - #2584

Merged
fzaninotto merged 1 commit into
marmelab:masterfrom
afilp:fix-menuItemLink-proptypes
Nov 28, 2018
Merged

fzaninotto merged 1 commit into
marmelab:masterfrom
afilp:fix-menuItemLink-proptypes

Conversation

@afilp

@afilp afilp commented Nov 27, 2018

Copy link
Copy Markdown
Contributor

As documented in react-router, the <NavLink> component can have either string or object type for its `to' property:

https://reacttraining.com/react-router/web/api/Link

Some developers use it as such:

              <MenuItemLink
                to={{
                  pathname: '/departments',
                }}
                primaryText="departments"
                title="departments"
                onClick={onMenuClick}
                leftIcon={<BusinessIcon />}
              />

@fzaninotto
fzaninotto merged commit caeffe3 into marmelab:master Nov 28, 2018
@fzaninotto

Copy link
Copy Markdown
Member

Thanks!

@fzaninotto fzaninotto added this to the 2.4.4 milestone Nov 28, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants