import AttachmentsViewModel from "@arcgis/core/widgets/Attachments/AttachmentsViewModel.js";const AttachmentsViewModel = await $arcgis.import("@arcgis/core/widgets/Attachments/AttachmentsViewModel.js");- Inheritance:
- AttachmentsViewModel→
Accessor
- Since
- ArcGIS Maps SDK for JavaScript 4.15
Provides the logic for the Attachments widget.
Constructors
Constructor
Constructor
Parameters
| Parameter | Type | Description | Required |
|---|---|---|---|
| properties | | |
See the properties table for a list of all the
properties that may be passed into the constructor.
Properties
Any properties can be set, retrieved or listened to. See the
Watch for changes
topic.
| Property | Type | Class |
|---|---|---|
| | ||
attachmentInfos readonly | | |
| | ||
| | ||
| | ||
declaredClass readonly inherited | ||
| | ||
| | ||
| | ||
state readonly | | |
supportsResizeAttachments readonly | |
activeAttachmentInfo
Property
- Type
- AttachmentInfo | null | undefined
The current AttachmentInfo being edited.
attachmentInfos
readonly Property
- Type
- Collection<AttachmentInfo>
A collection of AttachmentInfo defined on a feature.
orderByFields
autocast
Property
- Type
- AttachmentsOrderByInfo[] | null | undefined
An array of AttachmentsOrderByInfo indicating the display order for the attachments, and whether they should be sorted in ascending asc or descending desc order.
supportsResizeAttachments
readonly Property
- Type
- boolean
Defines whether or not the feature supports resizing attachments. This depends on whether the
feature layer's capabilities.attachment.supportsResize is set to true.
Methods
| Method | Signature | Class |
|---|---|---|
getAttachments(): Promise<AttachmentInfo[]> | |
getAttachments
Method
- Signature
-
getAttachments (): Promise<AttachmentInfo[]>
Queries for the attachments on a feature. Attachments for multiple features can be queried if the layer's
capabilities.operations.supportsQueryAttachments is true.
- See also
- Returns
- Promise<AttachmentInfo[]>
When resolved, returns the AttachmentInfo of the queried feature.