Skip to content

allow

function allow(): Allow;

Lets a change go through. Return it from a should… hook when the plugin has nothing against the change.

Allow

{ allow: true }

// only rows with the tag #keep are protected. Every other delete goes through
ctx.hooks.shouldDelete({ on: 'row' }, delta => {
const tags = delta.kind === 'deleted' ? ctx.facets.core.tags.tags.of({ facets: delta.value.facets ?? {} }) ?? [] : [];
return tags.includes('keep') ? veto('protected', 'Tagged #keep') : allow();
});