Closed dziraf closed 1 year ago
Hmm but will this work? with filters?
I just tried like this
<StyledLink
size="icon"
onClick={() => navigate(-1)}
rounded
mr="lg"
type="button"
>
Seems working
nah - disregard that - it won't work with multiple show click, - the back click just loads the previous show action
I rewrote routing so that back button works as expected now, but it turned out we also have to rewrite the Drawer component since it doesn't show list underneath anymore.
https://github.com/SoftwareBrothers/adminjs/assets/16668924/d8e1b0cd-a044-4934-8c6a-c771c9de44f5
It looks to be working correctly now (also fixed a bug where filters weren't retained when opening the drawer)
https://github.com/SoftwareBrothers/adminjs/assets/16668924/63b9ceda-58d3-41b4-9d36-4ff67c5d1024
:tada: This PR is included in version 7.2.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket:
This fixes the issue where drawer doesn't close correctly, but introduces another issue where refreshing the page will result in 404. This is because
to=".." relative="path"
only removes URL's pathname up to last/
which in case ofshow
action removes record's ID which results in drawer getting closed. AdminJS doesn't have a record route without:recordId
param defined though, so when you refresh the page you see aCANNOT GET ...
error.We'd probably have to rewrite routing so that routes are nested, this way we could simply use
relative="route"
.