Skip to content

Allow

The object that a should… hook returns to let a change go through. It is one of the four forms of a Decision.

A plugin does not write this object by hand. It calls allow(), which returns it. A hook returns it when the plugin has no objection to the change.

ctx.hooks.shouldDelete({ on: 'row' }, delta => {
return isProtected(delta) ? veto('protected', 'This row cannot be deleted') : allow();
});
readonly allow: true;

Always true. The app recognizes the answer by the presence of this property.