How to cancel an action using a plugin? #1945
-
In the very first paragraph in the plugin docs, a bullet point says that we can change or even cancel actions. Can anyone provide an example of how this is achievable? Right now, I'm using a workaround by setting some property using |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This was a leftover from the past, it was removed due to the conflict of having multiple Technically, one should be able to add the property in a plugin (similar to devtools plugin wrapping each action) and do the check within the wrapped action to completely skip calling the action. That would prevent you from changing actions at all. I updated the docs at 5bc44d3 (in the docs branch). |
Beta Was this translation helpful? Give feedback.
This was a leftover from the past, it was removed due to the conflict of having multiple
$onAction()
not being able to decide whether an action should be canceled or not (4dc1f1b).Technically, one should be able to add the property in a plugin (similar to devtools plugin wrapping each action) and do the check within the wrapped action to completely skip calling the action. That would prevent you from changing actions at all.
I updated the docs at 5bc44d3 (in the docs branch).