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

fix(Resource): Added exact to all <Route /> #3021

Closed
wants to merge 2 commits into from
Closed

fix(Resource): Added exact to all <Route /> #3021

wants to merge 2 commits into from

Conversation

kopax
Copy link
Contributor

@kopax kopax commented Mar 18, 2019

Fix #2910

This will prevent any resource route to be selected not intentionally.

Dimitri KOPRIWA and others added 2 commits March 19, 2019 05:07
Fix #2910 

This will prevent any resource route to be selected not intentionally.
Pass prop exact to <Route /> instead of rendered component
Copy link
Contributor Author

@kopax kopax left a comment

Choose a reason for hiding this comment

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

We are hitting more and more this bug since we started to add many child resource. When a route is catched, we must know about it because no error is thrown (it is expected)

Copy link
Collaborator

@djhi djhi left a comment

Choose a reason for hiding this comment

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

This is the wrong place to add exact. It should be added in RoutesWithLayout where we add a route for every Resource at L40.

@kopax
Copy link
Contributor Author

kopax commented Mar 20, 2019

I see, is that because <Route /> props within <Resource /> will not be used as it is declared? (cloneElement).

I am surprised, I will close this one and prepare another PR with the recommended change.

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