Skip to content

@memberjunction/ng-simple-record-list

A lightweight, reusable Angular component for displaying, creating, editing, and deleting records from any MemberJunction entity. Provides a streamlined grid interface with built-in CRUD operations, custom action buttons, and inline form dialogs.

The SimpleRecordListComponent is designed for settings pages and administrative interfaces where a full data grid is overkill. It renders a simple list of records for a given entity with configurable columns, sorting, and action buttons (edit, delete, custom action). New records and edits are handled via the EntityFormDialogComponent.

graph TD
    SRL["SimpleRecordListComponent\n(<mj-simple-record-list>)"] --> KG["Record Grid\n(Kendo Grid)"]
    SRL --> EFD["EntityFormDialogComponent\n(Edit/New)"]
    SRL --> DEL["Delete Confirmation\n(Kendo Dialog)"]
    SRL --> CA["Custom Action Button"]

    KG --> EDIT["Edit Button"]
    KG --> DELETE["Delete Button"]
    KG --> CUSTOM["Custom Action"]

    style SRL fill:#7c5295,stroke:#563a6b,color:#fff
    style KG fill:#2d6a9f,stroke:#1a4971,color:#fff
    style EFD fill:#2d8659,stroke:#1a5c3a,color:#fff
    style DEL fill:#b8762f,stroke:#8a5722,color:#fff
    style CA fill:#b8762f,stroke:#8a5722,color:#fff
    style EDIT fill:#2d8659,stroke:#1a5c3a,color:#fff
    style DELETE fill:#2d8659,stroke:#1a5c3a,color:#fff
    style CUSTOM fill:#2d8659,stroke:#1a5c3a,color:#fff
  • Entity-agnostic: Works with any MemberJunction entity by name
  • Configurable columns: Specify which columns to display, or auto-select from metadata
  • CRUD operations: Built-in New, Edit, and Delete with confirmation dialogs
  • Custom action button: Optional per-row action with configurable icon, tooltip, and handler
  • Dynamic icons/tooltips: Custom action icon and tooltip can be functions of the record
  • Inline form editing: Opens EntityFormDialogComponent for editing individual records
  • Section-mode editing: Optionally show only a specific form section in the edit dialog
  • Default values: Set default field values for new records
  • Extra filter: Apply additional SQL filter to scope the visible records
  • Delete prevention: Cancel delete via event handler
  • Sorting: Sort by any column
Terminal window
npm install @memberjunction/ng-simple-record-list
DependencyPurpose
@memberjunction/coreMetadata, BaseEntity, RunView
@memberjunction/ng-entity-form-dialogRecord editing dialog
@memberjunction/ng-notificationsNotification service
@progress/kendo-angular-gridGrid display
@progress/kendo-angular-dialogConfirmation dialogs
<mj-simple-record-list
[EntityName]="'Roles'"
[Columns]="['Name', 'Description']"
[SortBy]="'Name'"
[AllowNew]="true"
[AllowEdit]="true"
[AllowDelete]="true"
[ExtraFilter]="'IsActive = 1'"
(RecordSaved)="onSaved($event)"
(RecordDeleted)="onDeleted($event)">
</mj-simple-record-list>
InputTypeDefaultDescription
EntityNamestring''Entity to display records for
Columnsstring[][]Column names to display
SortBystring''Column to sort by
AllowNewbooleantrueShow New button
AllowEditbooleantrueShow Edit button per row
AllowDeletebooleantrueShow Delete button per row
AllowCustomActionbooleanfalseShow custom action button per row
CustomActionIconstring''FA icon class for custom action
CustomActionIconFunction(record: BaseEntity) => stringnullDynamic icon per record
CustomActionTooltipstring''Tooltip for custom action
CustomActionTooltipFunction(record: BaseEntity) => stringnullDynamic tooltip per record
ExtraFilterstring''Additional SQL filter
DefaultValuesRecord<string, string>{}Default values for new records
EditSectionNamestring''Show only this section in edit dialog
OutputTypeDescription
RecordSavedEventEmitter<BaseEntity>Emitted after record save
RecordDeletedEventEmitter<BaseEntity>Emitted after record delete
CustomActionClickedEventEmitter<BaseEntity>Emitted when custom action clicked
DeleteRequestedEventEmitter<{record, cancel}>Emitted before delete (cancelable)
ExportTypeDescription
SimpleRecordListComponentComponentThe record list component
SimpleRecordListModuleNgModuleModule declaration
Terminal window
cd packages/Angular/Explorer/simple-record-list && npm run build

ISC