AttachmentsViewModel

AMD: require(["esri/widgets/Attachments/AttachmentsViewModel"], (AttachmentsViewModel) => { /* code goes here */ });
ESM: import AttachmentsViewModel from "@arcgis/core/widgets/Attachments/AttachmentsViewModel";
Class: esri/widgets/Attachments/AttachmentsViewModel
Inheritance: AttachmentsViewModel Accessor
Since: ArcGIS API for JavaScript 4.15

Provides the logic for the Attachments widget.

See also:

Constructors

new AttachmentsViewModel(properties)
Parameter:
properties Object
optional

See the properties for a list of all the properties that may be passed into the constructor.

Property Overview

Any properties can be set, retrieved or listened to. See the Working with Properties topic.
Show inherited properties Hide inherited properties
Name Type Summary Class
AttachmentInfomore details

The current AttachmentInfo being edited.

more detailsAttachmentsViewModel
AttachmentInfo[]more details

A collection of AttachmentInfo defined on a feature.

more detailsAttachmentsViewModel
Stringmore details

The name of the class.

more detailsAccessor
Graphicmore details

The graphic for the attachments.

more detailsAttachmentsViewModel
Stringmore details

The current mode performed by the user.

more detailsAttachmentsViewModel
Stringmore details

The current state of the widget.

more detailsAttachmentsViewModel
Booleanmore details

Defines whether or not the feature supports resizing attachments.

more detailsAttachmentsViewModel

Property Details

activeAttachmentInfo AttachmentInfo

The current AttachmentInfo being edited.

See also:
attachmentInfos AttachmentInfo[]readonly

A collection of AttachmentInfo defined on a feature.

See also:
declaredClass Stringreadonly inherited

The name of the class. The declared class name is formatted as esri.folder.className.

graphic Graphic

The graphic for the attachments.

mode String

The current mode performed by the user.

Possible Values:"view"|"add"|"edit"

Default Value:"view"
state Stringreadonly

The current state of the widget.

Possible Values:"ready"|"disabled"|"loading"

Default Value:"ready"
supportsResizeAttachments Boolean

Defines whether or not the feature supports resizing attachments. This depends on whether the feature layer's capabilities.operations.supportsResizeAttachments is set to true.

Method Overview

Name Return Type Summary Class
Promise<AttachmentInfo[]>more details

Queries for the attachments on a feature.

more detailsAttachmentsViewModel

Method Details

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.

Returns:
Type Description
Promise<AttachmentInfo[]> When resolved, returns the AttachmentInfo of the queried feature.
See also:

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.