JSON representation of a Property.
Members
Array.<object>
|
null
# availableValues
If property has restricted number of values
Properties:
Name | Type | Description |
---|---|---|
label |
string
|
|
value |
string
|
number
|
object
# components Optional
All component names overridden by the user in PropertyOptions
Properties:
Name | Type | Attributes | Description |
---|---|---|---|
show |
string
|
<optional> |
|
edit |
string
|
<optional> |
|
filter |
string
|
<optional> |
|
list |
string
|
<optional> |
object
# custom
Custom parameters passed from the PropertyOptions.custom.
Properties:
Name | Type | Description |
---|---|---|
{...} |
any
|
string
# description Optional
Description of field. Shown as hoverable hint after label.
To use translations provide it in locale with specified options key from resource
Example
```js
new AdminJS({
resources: [
{
resource: myResource,
options: {
properties: {
myAwesomeProperty: {
description: "Plane description" || "awesomeHint", // <- message key in locale
},
},
},
},
],
locale: {
translations: {
resources: {
myResource: {
messages: {
awesomeHint: "Locale description",
},
},
},
},
},
});
```
boolean
# isDraggable
Indicates if array elements should be draggable when editing.
It is only usable if the property is an array.
boolean
# isVirtual
Indicates if given property has been created in AdminJS PropertyOptions and hasn't
been returned by the database adapter.
string
# path
Path of the actual value inside the record. It is usually the same as propertyPath, with the
exception of array values.
string
# propertyPath
Property uniq path. For top level properties - the same as name, but for nested
properties it is separated with dot notation: nested.property
object
# props
Additional props passed to the actual react component
Properties:
Name | Type | Description |
---|---|---|
{...} |
any
|
string
|
null
# reference
Has a name of a resource to which it is a reference.
For instance property userId
will have here Users
Array.<BasePropertyJSON>
# subProperties
Contain list of all sub properties.
This is the case for nested schemas in MongoDB.
Type Definitions
Object
# BasePropertyJSON
Property without the path. Defined as `Omit`
Properties:
Name | Type | Description |
---|---|---|
... |
any
|
properties from PropertyJSON except |