descriptionProperty
descriptionProperty(
propertyName): (constructor) =>void
Sets ResourceDescription.resourceDescriptionProperty in ResourceMeta.description.
This decorator updates resource metadata (InternalResourceMeta.description),
indicating that a particular model property is "descriptive" for the resource.
For example, this could be the name, title, or label property, which is used
to display a short description of the resource in the user interface.
By default, when a resource (for example, Teacher) is displayed,
the user sees its name as the main descriptive field.
After applying this decorator, you can change which property is shown, for example, to lastName.
Properties name and description are automatically treated as descriptive by default.
Use this decorator if you want to explicitly specify another property for the resource description.
Before applying the decorator:
| Student | Teacher |
|---|---|
| Alice | John |
| Bob | Mary |
| Charlie | Emma |
| Dana | Frank |
After applying descriptionProperty to the Teacher resource with propertyName: 'lastName':
| Student | Teacher |
|---|---|
| Alice | Smith |
| Bob | Johnson |
| Charlie | Williams |
| Dana | Brown |
Parameters
propertyName
string
The name of the property to be used as the description.
Returns
(
constructor):void
Parameters
[constructor](function Object() { [native code] })
Constructor<unknown>
Returns
void