Expectation:
beforeRemoveRow performs an async action (go to database) and then returns false/true. In case of ‘false’ I expect the row to NOT be removed from the table.
Behavior:
Even if I return ‘false’ from beforeRemoveRow, the row gets deleted.
Example:
The hook’s callback looks something like this:
async function () => { return false }
I am wondering if it has to do with the ‘async’ keyword?
When I remove the ‘async’ syntax and go with with promise .then it behaves as expected and does not delete the row. However, in this case it fails to perform the async action before deleting the row.
(Actually this is a post continuing the last suggestion from
beforeRemoveRow, I need send the data to server and wait the response)