the beforeRemoveRow is exactly what you need. Can you share the rest of the code? I do not know why it does not work for your example. You just need to know that when the call is sent the row is deleted so I recommend adding a condition true/false for the deletion to happen when you get an answer from the server.
If I understand correctly, I would suggest that the function attached to beforeRemoveRow be async, and then you can await the server’s response and check if you will return false or not. The await will cause execution to stop until the promise is resolved, unlike promise.then() which just attaches a function and continues execution.
I have the same issue. I have an async call to the server and I’m waiting for it to send me back its response based on which I’ll decide if the row can be deleted.
I try with beforeRemoveRow to return a bool but the row gets deleted immediately, unless of course I set up the return value to false before the async.
How can I make HOT wait for my async?