In documentation, AdminBro said that they have predefined action
edit (record action) - update records in a resource
They also have hook after. So I define a function and assign it to MyResource.edit.after. The problem is this function not only execute when I save changes after edit, but also when I go to Edit page, that's not what I want.
How can I run this function only when I click Save Button on Edit page ?
I figured it out. Use
beforeinstead ofafterand comparerequest.methodtoPOSTin parameters