WarUI

Save policy: block, warn or allow

GRID-A15-F09P0baselinePlanned

Configure what happens on save when errors, warnings or pending validators exist. The options are to block with a message, ask for confirmation, or allow and tag the record. Consistent policies prevent bad data while keeping soft rules usable.

Planned. This page shows the specification from issue #195. The live example, source for every framework and the API reference replace it when the feature ships.

Live example

Grid with editable rows, one error and one warning, and a Save button.

Expected behavior

With 'block' set, save() resolves with status 'blocked' and focuses the summary. With 'confirm' set, an accessible dialog appears. With 'wait' set, save waits for async validators, up to the configured timeout.

Planned API surface

savePolicy.onErrorsavePolicy.onWarningsavePolicy.onPendingbeforeSavesaveBlockedsave()

Acceptance criteria

  • save() returns a result object containing a status and errors. (pending)
  • The beforeSave event can cancel the save or modify the payload. (pending)
  • The confirmation dialog defaults focus to Cancel. (pending)
  • A blocked save emits saveBlocked with the reasons. (pending)