@adminjs/objectionis an example of an adapter which does not allow you to provide an entire database.
databasesproperty when setting up your AdminJS instance. In case of
@adminjs/mongooseit would look as follows:
resourcesproperty when setting up your AdminJS instance. Example:
idof a resource to
profiles. Below you will find several examples of resource customization.
navigationproperty in your resource's options, example:
isVisibleoption for every property
showPropertiesin your resource
listaction and hide it from filters, but we will leave it enabled in
filterbut visible in
editcan also be achieved by setting
listaction. This can be changed by configuring
hrefoption. Let's say we want
usersresource to open an already-filtered
userslist which show only users that have "active" status:
listaction it will show you results in random order since the actual database query will be lacking sorting information (unless you use table UI to select a column to sort by). You can, however, define default sorting for your resource by specifying
updatedAtproperty with the latest records appearing at the top of the results list.
locale. This is not done on resource-level though, but during the instantiation process of AdminJS.
Userresource in the sidebar has been renamed to
There are no records in this resource
featuresand they will be merged with the rest of it's configuration. An example of a
@adminjs/passwords. This is a package which handles passwords hashing in
editform and shows a corresponding UI.