I was wondering whether there is a possibility to reload “Content” or “CurrentForm” instead of “CurrentField” (in PJAX terms) when executing a Custom GridField Row Action?
To illustrate the situation a little bit further I have marked the hosting ItemEditForm of my DataObject green and the hosted GridField (with the Custom Row Actions) red.
I followed the official tutorial for creating the Custom GridField Row Action.
When I execute the action, an async request is being sent to the GridField (which we know is just a “fancy” type of RequestHandler) with the header
X-Pjax: CurrentField. The re-rendered version of the GridField is being returned.
I was playing around with the X-Pjax header as per documentation but regardless of the value, the only thing returned and reloaded was the GridField.
The thing is, I need the whole form to reload since the GridField Action causes a data state change of the hosting DataObject. I cannot expect my users to F5 the page
Is there a best practice way of achieving this or do I have to have “fun” with Entwine?