Cancelable event fired when the user clicks Restore but before
RestoreConfirmed emits. Consumers can set cancel = true on
the event arg to abort the operation — useful for custom approval
workflows or for taking over the save themselves.
Number of rows where the current value differs from the snapshot.
Number of rows the schema has dropped or renamed since the snapshot.
The entity name. Required in 'undelete' mode (since there's no live
record to read it from). In 'live' mode it can be omitted and is
inferred from the LiveRecord.
When true, hides the optional reason text area entirely. Default: false.
Operating mode — 'live' for restoring an existing record from a
snapshot, 'undelete' for re-creating a hard-deleted record.
If specified, this provider will be used for communication and for all metadata purposes. By default, if not provided, the Metadata and RunView classes are used for this and the default GraphQLDataProvider is used which is connected to the same back-end MJAPI instance as the Metadata and RunView classes. If you want to have this component connect to a different MJAPI back-end, create an instance of a ProviderBase sub-class like GraphQLDataProvider/etc, and configure it as appropriate to connect to the MJAPI back-end you want to use, and then pass it in here.
When true, the Restore button is disabled until the user enters a non-empty reason. Useful for regulated environments where every reversal needs justification. Default: false.
Emitted when the user cancels the preview without restoring.
Emitted after the user confirms the restore (and BeforeRestoreCommit was not cancelled). The host is responsible for applying the field values to a BaseEntity, calling SetRestoreContext, and invoking Save().
Number of rows that are checked (will be applied on restore).
StaticɵdirStaticɵfacReturns either the default Metadata provider or the one specified in the Provider property, if it was specified
Returns either the default RunQuery provider or the one specified in the Provider property, if it was specified
Returns either the default RunReport provider or the one specified in the Provider property, if it was specified
Returns either the default RunView provider or the one specified in the Provider property, if it was specified
User cancelled the preview. Resets state and emits RestoreCancelled.
User clicked Restore — fire BeforeRestoreCommit (cancelable), then RestoreConfirmed if not cancelled.
Deselects every row in the preview.
A callback method that is invoked immediately after the default change detector has checked the directive's data-bound properties for the first time, and before any of the view or content children have been checked. It is invoked only once when the directive is instantiated.
Resets internal state — useful after a save completes so the panel can be reopened cleanly. Called by the host component when needed.
Selects every row that can be selected (skips immutable / drifted).
Toggles whether a single row is selected for restore. Updates the SelectedCount in real time so the primary button label reflects it.
Toggles whether unchanged rows are visible in the table. When false (default), only rows where current ≠ snapshot are shown.
Reusable slide-in panel that previews a restore operation against a historical MJRecordChangeEntity and lets the user confirm with field-level granularity.
This component is rendered by both:
It does NOT perform the save itself — the host component receives a RestoreCommitEvent with the selected field values and is responsible for applying them to a BaseEntity, setting the restore context, and calling Save(). This keeps the component purely presentational and reusable in any context.
Semantic correctness
The preview compares the full snapshot captured in the source change's
FullRecordJSONto the current live record (or to nothing in un-delete mode). It does NOT roll back a single delta — restoringv2means "make the record look like it did at v2", not "undo v3's changes".Example
Example