We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f2c3d2 commit 9746c26Copy full SHA for 9746c26
frontend/src/components/Items/EditItem.tsx
@@ -56,9 +56,9 @@ const EditItem = ({ item }: EditItemProps) => {
56
const mutation = useMutation({
57
mutationFn: (data: ItemUpdateForm) =>
58
ItemsService.updateItem({ id: item.id, requestBody: data }),
59
- onSuccess: () => {
+ onSuccess: (_data: ItemPublic, variables: ItemUpdateForm) => {
60
showSuccessToast("Item updated successfully.")
61
- reset()
+ reset(variables)
62
setIsOpen(false)
63
},
64
onError: (err: ApiError) => {
0 commit comments