Fires after the user closes the restore preview, with success
indicating whether the actual insert worked.
Fires after the deleted-record query completes.
Fires after the insert completes (success or failure).
Cancelable. Fires when the user clicks Restore on a deleted-record
card, before the preview panel opens. Setting cancel = true skips
the preview entirely — useful for consumers that want to take over
the restore flow themselves.
Cancelable. Fires when Visible flips to true and the bin is
about to query for deleted records. Setting cancel = true aborts
the query (and the panel will show the empty state).
Cancelable. Fires after the user clicks Restore in the preview but
before the entity is inserted. Setting cancel = true aborts the
insert.
Permission flags (computed once when EntityName is set).
Fires when the user closes the panel.
Optional context user. When omitted, falls back to this.ProviderToUse.CurrentUser per standard MJ conventions.
The name of the entity whose deleted records will be listed. Required.
Maximum number of deleted-record cards to load. Defaults to 200 — this
is a UI affordance, not a hard limit; consumers needing pagination
should listen to AfterRecycleBinOpen and surface their own UI
if deletedRecordCount === MaxRecords.
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.
The currently selected entry whose preview is open.
StaticɵdirStaticɵfacThe user has Delete permission and may browse the bin. The Restore button on each card additionally requires CanCreate.
Returns 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
Manually trigger a re-load — useful for consumers who want to refresh after some external event (e.g., a delete happened and they want the bin to re-populate immediately).
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.
Preview panel emitted RestoreConfirmed — perform the insert and emit the matching after* events.
User clicked Restore on a card — open the preview panel (unless a BeforeRecordRestore handler cancelled).
Slide-in panel that lists all hard-deleted records for a single entity and lets a user with
Deletepermission re-create any of them from its historical RecordChange snapshot.When to use
Surface this component from any entity-viewing context where the user might need to restore a hard-deleted record. The EntityViewerComponent, EntityDataGridComponent, and EntityCardsComponent already expose a
ShowRecycleBininput (defaulttrue) that renders a chip in their toolbar — you only need to use this component directly if you're building a custom viewer.Permissions
The chip / panel is gated on
entity.UserPermissions.CanDelete— rationale: there is no native "undelete" permission in MemberJunction, but if a user has the higher-trust permission to delete records of an entity, restoring deleted ones is well within scope. The actual re-create action additionally requiresCanCreate; without it the Restore button on each card disables with a tooltip.Soft deletes vs hard deletes
This component only surfaces hard-deleted records. Soft-deletes (e.g.,
IsDeletedflags,Status='Inactive', etc.) leave the record visible in normal entity views, so the standard Record Changes panel + restore preview already handles them — no Recycle Bin needed.Cancelable Before/After event surface
Every meaningful action emits a paired
before*/after*event. Thebefore*event carriescancel: booleanso consumers can intercept — useful for custom approval workflows, audit logging, or to take over the actual restore execution entirely. See BeforeRecordRestoreEventArgs and friends.Example
Example