fix bug menu is not rerender after created, updated and deleted
This commit is contained in:
@@ -61,6 +61,7 @@ const store = () => {
|
|||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
close()
|
close()
|
||||||
form.reset()
|
form.reset()
|
||||||
|
Inertia.get(route(route().current()))
|
||||||
},
|
},
|
||||||
|
|
||||||
onError: () => {
|
onError: () => {
|
||||||
@@ -85,6 +86,7 @@ const update = () => {
|
|||||||
onSuccess: () => {
|
onSuccess: () => {
|
||||||
close()
|
close()
|
||||||
form.reset()
|
form.reset()
|
||||||
|
Inertia.get(route(route().current()))
|
||||||
},
|
},
|
||||||
|
|
||||||
onError: () => {
|
onError: () => {
|
||||||
@@ -102,7 +104,9 @@ const destroy = async menu => {
|
|||||||
showCancelButton: true,
|
showCancelButton: true,
|
||||||
})
|
})
|
||||||
|
|
||||||
response.isConfirmed && Inertia.delete(route('superuser.menu.destroy', menu.id))
|
response.isConfirmed && Inertia.delete(route('superuser.menu.destroy', menu.id), {
|
||||||
|
onSuccess: () => Inertia.get(route(route().current()))
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
const submit = () => form.id ? update() : store()
|
const submit = () => form.id ? update() : store()
|
||||||
|
|||||||
Reference in New Issue
Block a user