Open Sexual opened 6 years ago
Good feature request. In the meantime, there is an undocumented workaround: you can provide a function for parentPath
and it will be invoked with the current Match
and the result will be used as the parentPath.
@davidmfoley indeed doing something like the below option does work.
parentPath={(match) => `/image/${match.params.id}`}
I'll look into getting a pull request done with a solution for it.
Is there a way for the parent path to have a param in it like the example below?
Doing this does not work, hence I believe that the parent path logic isn't the same as the one used in react router as when you click the backdrop, it will redirect to
/image/:id
without the actual ID.