You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
I have a resource named answers and another named questions. Within a route belonging to answers I have a list of questions displayed in a table. I want to use the DeleteButton to be able to delete a question from here. The DeleteButton accepts an attribute resource but it's only used to display the confirmation message.
When the time comes that RA does the actual delete request, it gets the resource from the context, in this case the wrong resource answers. You can see here
but it took me 1 hour of digging through your code, when the instinctively solution is to simply use the resource attribute in the button and have it pass down.
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
I have a resource named
answers
and another namedquestions
. Within a route belonging toanswers
I have a list ofquestions
displayed in a table. I want to use theDeleteButton
to be able to delete a question from here. TheDeleteButton
accepts an attributeresource
but it's only used to display the confirmation message.When the time comes that RA does the actual delete request, it gets the resource from the context, in this case the wrong resource
answers
. You can see herereact-admin/packages/ra-ui-materialui/src/button/DeleteWithConfirmButton.tsx
Line 53 in 0deb2b5
resource
is no longer passed down.Describe the solution you'd like
To be able to pass
resource
to theDeleteButton
and that property be passed down up until herereact-admin/packages/ra-core/src/controller/button/useDeleteWithConfirmController.tsx
Line 83 in 0deb2b5
Describe alternatives you've considered
I managed to resolve my problem using this:
but it took me 1 hour of digging through your code, when the instinctively solution is to simply use the
resource
attribute in the button and have it pass down.The text was updated successfully, but these errors were encountered: