Trash / Recycle bin
This module manage the deletion and restoration of records. It provides a default UI (a datatable) to see the deleted records and restore them.
Methods
# static getRecords(modelIdopt) → {Array.<object>}
Get the records that have been sent to trash
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
modelId |
string
|
<optional> |
Optional modelId to filter the deleted records of a single model |
The deleted records
Array.<object>
# static restoreRecord(recordId) → {boolean}
Restore a given record to its original collection
Parameters:
| Name | Type | Description |
|---|---|---|
recordId |
string
|
true if the record could be restored
boolean
# static showRecords(config)
Show the deleted records for a given model
Parameters:
| Name | Type | Attributes | Description |
|---|---|---|---|
config |
object
|
||
modelId |
string
|
Mandatory model id |
|
filter |
object
|
<optional> |
Optional filter |
filterSyntax |
object
|
<optional> |
"mongo" (default) | "normalized" |
sort |
object
|
<optional> |
Optional sort |
sortSyntax |
object
|
<optional> |
"mongo" | "normalized" (default) |